Open alvarezguille opened 5 years ago
Note that this has also been filed as https://bugzilla.mozilla.org/show_bug.cgi?id=1503860.
This is also an issue with type="text"
inputs inside a shadowRoot. Should that be filed as a separate issue? I'm getting Element <input id="username" type="text"> is not reachable by keyboard
when trying to fill that input with text via sendKeys.
Shadow DOM is not supported yet. Please give it a read on issue #1428.
@whimboo Yeah, that's understandable. I had also found the same thing recently... that geckodriver cannot serialize an element's shadowRoot property due to the cyclic references. What I'm also finding though, is that geckodriver CAN serialize and access elements within a shadowRoot. Other actions, like getting their text content, properties, and attributes all work as expected. Here are some selenium logs using webdriverio:
getting an attribute of an input element inside shadow DOM:
[GET] http://127.0.0.1:4444/wd/hub/session/36b990f1-62c0-8749-a65b-8370c7ffd965/element/46f04823-1a89-884a-a983-90831f28e9b6/attribute/placeholder
RESULT "foo"
attempting to set a value for the same input:
[POST] http://127.0.0.1:4444/wd/hub/session/36b990f1-62c0-8749-a65b-8370c7ffd965/element/46f04823-1a89-884a-a983-90831f28e9b6/clear
COMMAND elementSendKeys("46f04823-1a89-884a-a983-90831f28e9b6", "testing")
[POST] http://127.0.0.1:4444/wd/hub/session/36b990f1-62c0-8749-a65b-8370c7ffd965/element/46f04823-1a89-884a-a983-90831f28e9b6/value
DATA { text: 'testing' }
webdriver: request failed due to response error: element not interactable
webdriver: Request failed due to Element <input type="text"> is not reachable by keyboard
So the question is, why is a regular type="text" input element that is visible on screen and interactive, being treated as if it were a hidden element?
Only commands which interact with the element will check the getPointerInteractablePaintTree()
. Most likely in such a case this list doesn't contain the element, which will then cause the failure.
Is there any initiative to fix/change that?
Any update on this issue ?
Initially thought it was the same issue as #1173 but in this case the upload is displayed but in a shadowroot. Reported for Firefox in https://bugzilla.mozilla.org/show_bug.cgi?id=1503860
System
Testcase
Can be reproduced using https://github.com/Artur-/selenium-firefox-shadowdom
Stacktrace