Closed lacell75 closed 3 years ago
Hi thanks for the issue, I think this is a little out of the scope of this library, If you find yourself needing to reach for this sort of thing, have you considered using something like playwright? Playwright supports shadow Dom deep queries out of the box
If you did want to do something like this you could probably just combine a normal CSS selector using the library and then do am array .filter on the results for your desired behaviour, e.g. checking the innerText of elements or something like that
If you did want to do something like this you could probably just combine a normal CSS selector using the library and then do am array .filter on the results for your desired behaviour, e.g. checking the innerText of elements or something like that
Thanks, I have implemented this behavior with webdriver.io but I have a case that does not work: when an element does not exist yet, I don't know what to return in this case. Do you have an idea?
To begin, thank you very much for what you have done in this project and that is fantastic!
And It would be wonderful if you could implement a selector on text or certain text like :
For example, here's a query for class with the text "Open downloads folder":
querySelectorDeep(".dropdown-item=Open downloads folder");
or using partial text:querySelectorDeep(".dropdown-item*=Open");
other example with element button:
querySelectorDeep("button=Open downloads folder");
or using partial text:querySelectorDeep("button*=Open");
And same thing for an ID.
Currently : We have this error
invalid element state: Failed to execute 'querySelector' on 'Document': '.dropdown-item=Open downloads folder' is not a valid selector.
Do you think it would be possible to implement this?