I am running into a Safari issue where the /text command fails to include text of an element with a Shadow DOM. The structure of the component looks as following:
The element id of the div with class name app-profile was obtained an is node-E5A41EF6-1F5A-4E81-ACC7-69E3AC28247B. Now, when calling the /text command all it returns in the following:
2024-01-26T17:42:02.375Z INFO webdriver: COMMAND getElementText("node-E5A41EF6-1F5A-4E81-ACC7-69E3AC28247B")
2024-01-26T17:42:02.376Z INFO webdriver: [GET] http://0.0.0.0:64364/session/D505F956-4EF8-4BD7-825E-8B89EEC55FBB/element/node-E5A41EF6-1F5A-4E81-ACC7-69E3AC28247B/text
2024-01-26T17:42:02.379Z INFO webdriver: RESULT Hello! My name is Stencil.
This differentiates from Chromium and Gecko where the same command yields the text of nested Shadow DOMs:
2024-01-26T17:47:31.058Z INFO webdriver: COMMAND getElementText("D1D72808399D841D1198CF0F63D7F42A_element_5")
2024-01-26T17:47:31.058Z INFO webdriver: [GET] http://0.0.0.0:64658/session/7586ddad61c23653a234828ae154ad4e/element/D1D72808399D841D1198CF0F63D7F42A_element_5/text
2024-01-26T17:47:31.066Z INFO webdriver: RESULT Hello! My name is Stencil.
I am a nested component!
@christian-bromann this sounds like a bug in safaridriver / Safari and not for the webdriver specification. You probably want to file a bug on Apple's side.
I am running into a Safari issue where the
/text
command fails to include text of an element with a Shadow DOM. The structure of the component looks as following:The element id of the
div
with class nameapp-profile
was obtained an isnode-E5A41EF6-1F5A-4E81-ACC7-69E3AC28247B
. Now, when calling the/text
command all it returns in the following:This differentiates from Chromium and Gecko where the same command yields the text of nested Shadow DOMs: