Shadow DOM element detection

Ask general questions here.
StevenS
Posts: 1
Joined: Mon Apr 26, 2021 10:05 am

Shadow DOM element detection

Post by StevenS » Mon Apr 26, 2021 10:10 am

Why is it that some Shadow Dom elements cannot be found with a relative path, example:
.//div[@innertext='TEST']

But can be found with an auto generated path like:
.//tag[@tagname='taghere']/?/?/tag[@tagname='ion-tabs']/div//form[@action='sitehere']/tag/tag[2]/div/div/div[2]/tag[@tagname='custom-select']/div[2]/div[2]/div[@innertext='TEST']

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

Re: Shadow DOM element detection

Post by odklizec » Tue Apr 27, 2021 7:38 am

Hi,

Unfortunately, there is too little useful information regarding your problem, to provide a reasonable answer. Could you please provide, at very least, a Ranorex snapshot of the problematic page? Ideally, post a functional sample of web page, where this behavior could be reproduced. Also, please make sure you are using most recent Ranorex 9.5.0.
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

wonejiv127
Posts: 1
Joined: Wed May 05, 2021 8:46 am

Re: Shadow DOM element detection

Post by wonejiv127 » Wed May 05, 2021 8:55 am

StevenS wrote:
Mon Apr 26, 2021 10:10 am
Why is it that some Shadow Dom elements cannot be found with a relative path, example:
.//div[@innertext='TEST']

But can be found with an auto generated path like:
.//tag[@tagname='taghere']/?/?/tag[@tagname='ion-tabs']/div//form[@action='sitehere']/tag/tag[2]/div/div/div[2]/tag[@tagname='custom-select']/div[2]/div[2]/div[@innertext='TEST']
Hi buddy, can you share some error log screenshots?


Regards,
Connie R. Lawson