You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create a script for an example to go on the documentation page, I found that the checkbox wasn't being found and it would eventually timeout. The script I ran using k6-browser was:
This seems like a more general problem with selecting elements under a shadow DOM.
If you notice, input#horns is under a #shadow-root element. In DevTools you can't select it with $('#horns') either, but have to do something like $('shadow-output').shadowRoot.querySelector('#horns'). It's likely that Playwright supports this lookup transparently in some way, and we'd have to look into it. So I think this is more of a missing feature than a bug.
... though it didn't quite work for me on this page and I don't want to spend more time on this right now. 😓
imiric
changed the title
Checkbox is not being selected on the MDN example page
Support transparently selecting elements under a shadow DOM
Jul 29, 2022
Tested against: dbede12
When trying to create a script for an example to go on the documentation page, I found that the
checkbox
wasn't being found and it would eventually timeout. The script I ran usingk6-browser
was:I tested the same scenario in PW using the following and it was able to correctly select the checkbox:
The text was updated successfully, but these errors were encountered: