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

Does the selector of nightmare support psuedo classes? #603

Closed
shri3k opened this issue Apr 26, 2016 · 2 comments
Closed

Does the selector of nightmare support psuedo classes? #603

shri3k opened this issue Apr 26, 2016 · 2 comments

Comments

@shri3k
Copy link

shri3k commented Apr 26, 2016

Quick question. I'm not sure if this has been answered already before but I didn't find this in the docs or during my issue search but does nightmare support psuedo classes like :first or like these as it's selector?

@Mr0grog
Copy link
Contributor

Mr0grog commented Apr 26, 2016

Generally, things are selected by running document.querySelector(), so pseudo-selectors are supported to the extent that Chrome supports that API.

Most of them are well supported. I’m not sure if they all are, though. I don’t think anyone has tested all of them, especially things like :focus, which might be supported differently depending on whether the window is visible on screen or hidden (PhantomJS has a long standing bug related to this particular issue: ariya/phantomjs#10427).

@shri3k
Copy link
Author

shri3k commented Apr 26, 2016

Ahh, that actually clarifies things quite a bit. Apparently :first isn't supported and I happened to be testing only that. 😿 Found alternative to it by using :first-child. Thanks, @Mr0grog

@shri3k shri3k closed this as completed Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants