Problem to identify web objects

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
User avatar
BMT
Posts: 20
Joined: Fri Jun 12, 2020 11:48 am

Problem to identify web objects

Post by BMT » Fri Dec 17, 2021 9:58 am

Hallo,

we have a problem with recognizing some objects in our main web application.
This means in detail that a warning or info window can not be identified - neither via Xpath nor as an image.
Necessary object infos can't get idnetified by the Tracking recorder.

In the Browser Development tools (F12) of the Chrome Browser we could get information about the object path to the warning.

We can see that the object elements and descriptions are in a "shadow"-area.
The elements are introduced by "#shadow-root (closed)".
It seems that this definition causes the problem.

We thought since Ranorex 9 the object identification with shadow-dom-recognization should be added.

Do you have ideas how we can influence the object identification?
Are there any settings?
Are there possibilities to solve the problem by developing individual methods? Are there libraries we could use for this purpose?

We use Ranorex 10.0.0

Thank you,
Matthias
Image

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

Re: Problem to identify web objects

Post by odklizec » Fri Dec 17, 2021 10:09 am

Hi,

At first, please update Ranorex with most recent 10.1.4. Version 10.0.0 is outdated and no longer supported.

At next, could you please upload a Ranorex snapshot (NOT screenshot) of the problematic page, containing the element(s) in question? Are the elements available in Spy tree, just not traceable?
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: 20
Joined: Fri Jun 12, 2020 11:48 am

Re: Problem to identify web objects

Post by BMT » Tue Jan 11, 2022 4:54 pm

Hey odklizec,

we reproduced our problem with the current Ranorex version 10.1.4.
Unfortunately the problem still exists: objects below a shadow dom root with mode=closed are not recognized.

Because of security issues we are not allowed to make you snapshots available of our test environment and applications.

But we found a public shadow dom example page, which was appropriate for our issue.

We used the URL
https://embed.plnkr.co/fVIYs97WzjwjYnuDE75u/

As you can see in the attached screenshots - to compare two different situations we switched the root mode in the "script.js"-file from open to closed and captured the results.

In the snapshot for the open-mode-test objects below the shadow dom root are found.
In the snapshot for the closed-mode-test there are no objects found below the shadow root dom.

So is there a way to recognize obejcts below a shadow root dom, mode=closed?

Thank you in advance

kind regards,
Matthias Studemund (BMT Hamburg)
Attachments
Open.jpg
Open.jpg (237.17 KiB) Viewed 780 times
Link.txt
(44 Bytes) Downloaded 65 times
Closed.jpg
Closed.jpg (255.85 KiB) Viewed 780 times
Image

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

Re: Problem to identify web objects

Post by BMT » Tue Jan 11, 2022 4:56 pm

because only 3 attachements are possible:
here the 2 snapshots in a second post
Attachments
Snapshot_GenWebApp_OpenShadowDom_Ranorex_10.1.4.rxsnp
(86.42 KiB) Downloaded 65 times
Snapshot_GenWebApp_ClosedShadowDom_Ranorex_10.1.4.rxsnp
(86.35 KiB) Downloaded 66 times
Image

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

Re: Problem to identify web objects

Post by odklizec » Wed Jan 12, 2022 9:00 am

Hi,

Thanks for detailed analysis of the issue. I now see what you mean ;) I will forward the problem to Ranorex guys and let you know the result. I guess there is no workaround for now and that it will require an additional implementation inside Shadow DOM code.
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