You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
We use shadowDOM fairly extensively in our codebase, and wanted to automate a suite of tests using agouti. However - I'm hitting a major blocker accessing any DOM elements within the shadow root on the page.
It's not part of the webdriver spec, so not that surprising that there's no built in behaviour for this - the common workaround seems to be running custom javascript to explore the DOM / find elements.
Eventually(func() string {
var result string
p.RunScript(
`return document.querySelector("some-element").shadowRoot.querySelector("target-element"),
nil,
&result,
)
return result
}).Should(Equal("wat"))
However, it seems to return nothing, and i can't find any way of getting an *agouti.Selection out of the javascript return.
Is there any way to achieve this?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
We use shadowDOM fairly extensively in our codebase, and wanted to automate a suite of tests using agouti. However - I'm hitting a major blocker accessing any DOM elements within the shadow root on the page.
It's not part of the webdriver spec, so not that surprising that there's no built in behaviour for this - the common workaround seems to be running custom javascript to explore the DOM / find elements.
E.G
I've tried doing this through the RunScript API -
However, it seems to return nothing, and i can't find any way of getting an *agouti.Selection out of the javascript return.
Is there any way to achieve this?
The text was updated successfully, but these errors were encountered: