Elements in ShadowDOM could not be identified

Ask general questions here.
User avatar
BMT
Posts: 5
Joined: Fri Jun 12, 2020 11:48 am

Elements in ShadowDOM could not be identified

Post by BMT » Tue Jul 07, 2020 10:53 am

Hello,

using Ranorex 9.3.1 and Ranorex Automation extension for Chrome Version 83.0.4103.97 we cannot identify the disabled elements under ShoadowDOM. The value is readable in DOM Tree when activating the option „Show user agent ShadowDOM“ in Chrome Developer Tools.

In the attached Screenshot of the website under test with the developer tool open in Chrome: No 1 is the element, which Ranorex can identify. It does not have any Innertext to verify. No 2 is everything under this Shadow-Root, which Ranorex cannot identify.

We need to identify the innertext of these disabled elements and verify it.

Would you kindly assist us solving this issue?

Thanks
Attachments
ShadowDOM01.jpg
ShadowDOM01.jpg (92.45 KiB) Viewed 193 times
Image

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6180
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Elements in ShadowDOM could not be identified

Post by odklizec » Wed Jul 08, 2020 8:15 am

Hi,

At first, you should try most recent 9.3.2. At next, I'm afraid, there is not much anyone here can do or suggest without seeing, at very least, a Ranorex snapshot of the page in question. Could you please create the snapshot (not screenshot) and post it here? Also, have you tried it with different browser (FF, Chromium-based Edge)?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
BMT
Posts: 5
Joined: Fri Jun 12, 2020 11:48 am

Re: Elements in ShadowDOM could not be identified

Post by BMT » Wed Jul 08, 2020 3:41 pm

Hello,
thanks for your reply. We are now using the most recent Version of Ranorex. The Snapshot is attached.
Testing with Edge or FF is unfortunately not possible.
Attachments
AOSnapshot.rxsnp
(114.56 KiB) Downloaded 4 times
Image

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6180
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Elements in ShadowDOM could not be identified

Post by odklizec » Thu Jul 09, 2020 8:37 am

Hi,

Thanks for the snapshot. I'm afraid, that without seeing also testable HTML sample, there is not much anyone here can do or suggest. But you mentioned that there is a way of working with this kind of element, by enabling „Show user agent ShadowDOM“ option in Chrome Developer Tools. So why don't you enable it before running your test?

Also, why can't you try it in FF or Edge? I'm not asking for replacing Chrome in your test workflow with other browser. Simply try to identify the given element in different browser. Just to see, if Spy is able to identify this shadow element in different browser. This could give us a hint if the problem is common to all browsers or just Chrome, so Ranorex devs could/should do something about this?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
BMT
Posts: 5
Joined: Fri Jun 12, 2020 11:48 am

Re: Elements in ShadowDOM could not be identified

Post by BMT » Thu Jul 16, 2020 2:12 pm

Hallo,

unfortunately it is not easy to test with other browsers. I will try it again and let you know, if it was permitted and successful.
You can find attached an HTML sample. I hope it helps.
Thanks for your support
Image

User avatar
BMT
Posts: 5
Joined: Fri Jun 12, 2020 11:48 am

Re: Elements in ShadowDOM could not be identified

Post by BMT » Fri Jul 17, 2020 9:25 am

The file containing the HTML code was not accepted. It is now uploaded as a Zip file.
Attachments
HTML.zip
(3.04 KiB) Downloaded 7 times
Image

User avatar
Support Team
Site Admin
Site Admin
Posts: 12143
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Elements in ShadowDOM could not be identified

Post by Support Team » Wed Jul 22, 2020 7:45 pm

Hello BMT,

Due to the nature of the issue I recommend creating a support query so that a Ranorex Support Engineer may further assist. Please provide all relevant information including samples and snapshots.

https://www.ranorex.com/support-query/

Regards,
Sean
.
Image

User avatar
BMT
Posts: 5
Joined: Fri Jun 12, 2020 11:48 am

Re: Elements in ShadowDOM could not be identified

Post by BMT » Mon Jul 27, 2020 8:17 am

Hello Sean,

will do. Thanks
Image