Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow matching extracted XPath #33

Open
Rhobal opened this issue Jan 3, 2017 · 1 comment
Open

Allow matching extracted XPath #33

Rhobal opened this issue Jan 3, 2017 · 1 comment

Comments

@Rhobal
Copy link

Rhobal commented Jan 3, 2017

I'm trying to verify content that has been rendered in XHTML.
I can do that by looking for an XPath that contains the content, e.g.

assertThat(xhtml, XhtmlMatchers.hasXPath("//ns1:div[@id='content'][text()='Somecontent']", NS1));

However, if the structure is right but the content is wrong, I'm just informed that the XPath was not found. It would be much more comfortable, if I could add matchers to check the xpath result:

assertThat(xhtml, XhtmlMatchers.hasXPath("//ns1:div[@id='content']/text()", NS1, equalTo("Somecontent"));

An error would then show that the content that is wrong.

@dmarkov
Copy link

dmarkov commented Jan 9, 2017

@yegor256 dispatch this issue please, see par.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants