Open praveenrp1610 opened 1 year ago
Thank you for setting this as an enhancement. One of the product folk will triage this again to help see when we can fit this in an upcoming sprint.
This looks like it could be a mix and match of Selenium and Nightwatch here and we might not expose the ShadowRoot
object here.
We are going to need to expose findElement
. As a workaround if you use find
instead of findElement
it should do what you need.
Hi David,
Unfortunately, I have tried with find
and that resulted in the same error
The major issue with Nightwatch seems to ability to test anything with "SHADOW DOM "
Most of our products are switching to micro frontends that work on the shadow dom concept. I have tried Playwright as a POC comparison with Nightwatch and it does not have the same issue as Nightwatch.
Can you please prioritise this higher ?
Nightwatch does work fine with Shadow doms which are not closed. See this example (not yet updated to Nightwatch 2.5): https://github.com/nightwatchjs/nightwatch-examples/blob/main/tests/shadowRootExample.js
I'll look into it.
Description of the bug/issue
When I navigate validate element inside an shadow element with nightwatch 2.5.0
const shadowRootEl = await browser.useXpath().getShadowRoot('//shadow root container') await shadowRootEl.findElement(some element);
Then I get the error as shadowRootEl.findElement is not a function
Steps to reproduce
When I validate element inside an element with nightwatch 2.5.0
const shadowRootEl = await browser.useXpath().getShadowRoot('//shadow root container') await shadowRootEl.findElement(some element);
Then I get the error as shadowRootEl.findElement is not a function
Sample test
Command to run
No response
Verbose Output
Nightwatch Configuration
No response
Nightwatch.js Version
2.5.0
Node Version
No response
Browser
Chrome 107.0.3
Operating System
Linux Docker container
Additional Information
This is working with 2.4.1 but not with latest version