How to get ShadowRoot DOM Properties in UiPath?

Hi, i’m trying to get DOM properties (like parentclass, tag, class name, id, attribute etc). But can’t able to get shadowRoot properties using Get Attribute activities. Is there any approach to get this?

FYI, PFA the below screenshot.

image

Hello @Ganesh_Kumar_Ramacha!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

Hi Ganesh,

Do you solved this problem?
I meet the same problem.

Hi @vincent.li,

Yes, i found a solution by writing JS code. By using Inject JS Script activity in UiPath I return the ShadowRoot value form browser.

Cheers!

Cool, js can get the shadow root, but how to continue RPA with this shadow root? all the click and type activities need to indicate to the web. I try to use this shadow root as a element, but it’s not working well.

OHH…I thought its getting data from browser. I’m not sure about click and type into selector. Will check.

Hey, did you get any solution for this problem

I hope everyone knows about Shadow Root and It would not generate any DOM, so obviously UiSelector also would not generate any selectors for that element.

  1. Open UiPath UiExplorer
    image

  2. Click UI Frameworks
    image

  3. Click Active Accessibility
    image

  4. Click Indicate Screen and navigate where you want, now you can access all the elements as you do before.

  5. The generated selectors will look like desktop selectors, you will not get any web selector but it will work as we expect and you can modify the attribute. PFB screenshot for reference.

Regards,
Amju / Amjadh H