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

Shadow Root throws UnsupportedOperationException #2672

Closed
PraveenHudgi1 opened this issue Jan 22, 2022 · 7 comments
Closed

Shadow Root throws UnsupportedOperationException #2672

PraveenHudgi1 opened this issue Jan 22, 2022 · 7 comments

Comments

@PraveenHudgi1
Copy link

Please refer below bug for issue description.

SeleniumHQ/selenium#10269

@wakaleo
Copy link
Member

wakaleo commented Jan 22, 2022

Can you provide a sample project?

@PraveenHudgi1
Copy link
Author

Sorry , I did not get you .

Are you asking to share the project which we are using ?

@wakaleo
Copy link
Member

wakaleo commented Jan 22, 2022

Yes, can you provide a sample project that reproduces this issue?

@PraveenHudgi1
Copy link
Author

Sorry , I cant provide you a sample project , Its work project , I cant share it .

Please follow below steps to reproduce by using serenity.

Steps to reproduce:

1.Create an account with uipath cloud community application from this link https://cloud.uipath.com and login into application.
2.Left side panel have shadow element.
3.Click on apps or Action Center from the left side panel.
3.Getting an error when I am trying to click one of the option which is present at left side panel.

I am getting error when script is executing 2nd line.

1.WebElement shadowHost = find(By.xpath("//portal-nav"));
2.SearchContext shadowRoot = shadowHost.getShadowRoot();

Error:java.lang.UnsupportedOperationException: getShadowRoot

Serinity 3.1.15(Selenium version 4.1.1)
Chrome browser:97
Windows 10
Java:8 update 251

@wakaleo
Copy link
Member

wakaleo commented Jan 22, 2022

If you can't provide a sample project to reproduce the issue it is unlikely that someone will pick up the issue to try to resolve it (unless it comes up as a support request from a commercial client). Have you tried looking into the code yourself?

@wakaleo
Copy link
Member

wakaleo commented Feb 12, 2022

Try with 3.2.0 - the Shadowdom logic has had some refactoring. Otherwise, step into the Serenity code to see what it is doing.

@wakaleo
Copy link
Member

wakaleo commented Feb 13, 2022

You can access Shadow Dom elements using the ByShadow locator: https://javadoc.io/doc/net.serenity-bdd/serenity-core/latest/index.html

@wakaleo wakaleo closed this as completed Feb 13, 2022
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

2 participants