LR Trueclient:unable to locate elements inside shadow dom
ISSUE:LR Trueclient:unable to locate elements inside shadow dom
HOW TO STEPS:
is there any solution to locate the elements under shadow dom.
I would like to know is there any solution so that we can handle shadow dom elements on the page
Submiting on behalf of arun.kumar@riversand.com
DISCLAIMER:
Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
TruClient already delivered feature supporting ShadowDOM element in LR 2020 SP3 and later versions, please try your AUT by using the target version.
Please check the 2020SP3 what's new. What's New (microfocus.com)
Regards,
Zhipeng
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
yes I am with latest 2021 version installed. here we are able to capture the element and locate it however element will not be located if we refresh the page or replay the step for automatic .I would like to know is there any way we can do it with document query selector and pass it to ID java script
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi @Arun Kumar1 ,
Maybe it's because the DOM structure has been changed after refreshing the page.
For your question, yes, you can write javascript code to locate the target element inside a shadowDOM, make sure first locate its shadowRoot, then querySelector the target. You can directly put the code into the javascript ID method textbox.
Below is a simple case: