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

element.querySelectorAll returns 0 elements in some cases #206

Open
niklasHagner opened this issue Apr 17, 2024 · 1 comment
Open

element.querySelectorAll returns 0 elements in some cases #206

niklasHagner opened this issue Apr 17, 2024 · 1 comment

Comments

@niklasHagner
Copy link
Contributor

niklasHagner commented Apr 17, 2024

This is not a well defined issue, I figured I'd post it first with my initial findings and not spend extra time creating an isolated test-case - because I'm not sure what the intended support for querySelectorAll is supposed to be in Tallahassee these days.

I just discovered this:

I was working in test with mocha + tallahaassee.

  • The initial code was browser.document.querySelectorAll(".bylines .watch--follow") - this worked fine and it did find one matching element
  • I changed it to articleElement.querySelector(".bylines .watch--follow").innerHTML - that also worked fine
  • When I changed it to articleElement.querySelectorAll(".bylines .watch--follow").length I got the output 0

Screenshot from my vsCode debug console, while debugging a test

  • First I log .querySelector(".bylines .watch--follow").innerHTML - this finds an element and outputs some html
  • Then I log .querySelectorAll(".bylines .watch--follow").length this finds zero elements

image

I'm suspecting that browser.document.querySelectorAll works fine but element.querySelectorAll does not.

Is this perhaps an expected limitation of the tallahaassee support for querySelectorAll ?

@niklasHagner niklasHagner changed the title querySelectorAll returns 0 elements incorrectly element.querySelectorAll returns 0 elements in some cases Apr 17, 2024
@niklasHagner
Copy link
Contributor Author

niklasHagner commented Apr 22, 2024

PS:

Was using tallahassee v14.5.0

So might be an obsolete issue

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