AutomaApp / automa

A browser extension for automating your browser by connecting blocks
https://www.automa.site
Other
11.41k stars 1.23k forks source link

how select element inside shadow-DOM ? #1624

Closed trasferimento closed 8 months ago

trasferimento commented 8 months ago

Describe the bug ServiceNow site has deploy a new release ( Vancouver version ) , in which they have "moved" all the intersting data's elements inside a shadow-DOM : using Chrome debugger this section start with

#shadow-root(open ) ...

Using the element selector I can just select the element above/that "load" all the elements that I'm interesting in , for grabbing text.

Is there a special syntax ( CSS combinator ) to reach these elements ? Like for elements inside iframe , I can use the CCS combinator |>, for instance component1 |> component2 ?

Using a tool similar to Automa App, Browserflow extension, I can reach these elements using the CSS combinator >>> ( not working with Automa )

Expected behavior Using element selector, being able to select elements inside this "shadow DOM"

Screenshots capture

Desktop (please complete the following information): Windows,
Chrome,
Automa Version: 1.28.26

Kholid060 commented 8 months ago

Use shadow-dom-selector >> element-selector syntax

image

https://docs.automa.site/workflow/element-selector.html#custom-selector-syntax

trasferimento commented 8 months ago

thanks a lot ! It works

bryan-zhu-dev commented 1 month ago

thanks a lot ! It works

Can you provide an example how it works?