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

incorrect selector to xpath translation #14

Open
bkdotcom opened this issue Aug 4, 2015 · 1 comment
Open

incorrect selector to xpath translation #14

bkdotcom opened this issue Aug 4, 2015 · 1 comment

Comments

@bkdotcom
Copy link

bkdotcom commented Aug 4, 2015

'.classa > .classb'

should be: 'descendant-or-self::*[contains(concat(" ",@class," ")," classa ")]/*[contains(concat(" ",@class," ")," classb ")]'
edit: corrected on 2015-08-26

changing
$selector = str_replace(']/*', ']', $selector);
to
$selector = str_replace(']/*[position', '][position', $selector);
fixes the issue and passes regression testing

@bkdotcom
Copy link
Author

my bad, should be
'descendant-or-self::*[contains(concat(" ",@class," ")," classa ")]/*[contains(concat(" ",@class," ")," classb ")]'

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

No branches or pull requests

1 participant