megakrish
(Meganathan Krishnamoorthy)
17 January 2023 17:21
1
I am using browser library to automate our angular app. However i am not unable to click a button inside this shadow-root. Tried all locators and nothing seem to be working or its not identifying the locator at all
This is my page and //button[@id = ‘undefined’] is my locator
megakrish
(Meganathan Krishnamoorthy)
23 January 2023 16:15
2
Can someone help me with the above problem I am facing with shadow dom and browser library?
Try using js path
Right click on the element in console (Chrome) > copy > Copy JS path
The element will now be document.queryselector(“#something ”).shadow root(“something”)
You might need to add dom: to the beginning
dom:document.queryselector…
Plug that in the place of the //[…] And see what happens
_daryl
(daryl)
30 January 2023 18:41
4
Looks to be a duplicate post of
I am using browser library to automate our angular app. However i am not unable to click a button inside this shadow-root. Tried all locators and nothing seem to be working or its not identifying the locator at all
[image]
This is my page and //button[@id = ‘undefined’] is my locator
Linking for visibility of what people have suggested.
1 Like