galen icon indicating copy to clipboard operation
galen copied to clipboard

How to define an element inside of shadow-DOM in .gspec file?

Open Templa opened this issue 5 years ago • 6 comments

I need to define an element that is inside shadow DOM

When I try to run the visual test, this fail because no finds the element on the page

Example:

  • Existis the shadow root Section: drawer with a <drawer> </drawer>
  • Inside there are the shadow DOM structure Section
   <div  id="drawer-container"> // CONTENT HERE</div>   
   <div id="drawer-overlay"> // CONTENT HERE</div>

I need to define the element that is inside of drawer ( shadow root )

@objects
     header   id    drawer-container

but the element fail when galen to trie to define it

I try to use css / xpath / id but I fail

Anyone know how to define an element inside of shadow DOM ?

Templa avatar Jul 12 '19 17:07 Templa

I am having a similar issue here, since Galen is based on Selenium and shadowRoot is only accessible by JS, it would be necessary to support using js scripts to select items.

riffdr avatar Jan 16 '20 13:01 riffdr

Hi Guys, I've modified Galen's code base to include support for accessing elements inside ShadowDOM. This works well for Chrome. Sometimes I face issues on Firefox & Safari (because I guess only recent versions of these browser's support ShadowDOM). I'll run some more tests and confirm back in few days.

ishannavgire avatar Sep 28 '20 06:09 ishannavgire

that's grand news, thank you!

riffdr avatar Sep 28 '20 07:09 riffdr

That’s a great news. Waiting for it.

UdaySun avatar Sep 28 '20 07:09 UdaySun

Good morning ishannavgire, are there any updates on our upgrade?

riffdr avatar Nov 16 '20 08:11 riffdr

Hello, looking forward to any updates!

riffdr avatar Dec 12 '20 20:12 riffdr