Bonvi
Power Member
- Jul 15, 2019
- 756
- 419
How do I even do that? Everytime I run it, I can't find the element! It drives me nuts. Of course i googled and found a few entries on stack overflow but it didn't work for me.
Supposed to use it like this (direct copy):
root1=driver.find_element(By.XPATH,"//dx[@bookmark='Save']").shadow_root
root2=root1.find_element(By.XPATH,".//dx-container/div")
Tried that but didn't work for some reason.
Site looks like this:
<div class="_cell symbolName" role="cell" draggable="true" tabindex="0"><set-class binding="this.flags.symbolName" target=".."></set-class><text-binding fallbackvalue=" " binding="this.symbolName"></text-binding></div>
#shadow-root(open) == $0
"Text I want"
How would I get that element? Any clues?
Edit: Just saw there is another shadow-root element further up
No clue how I even deal with that.
Supposed to use it like this (direct copy):
root1=driver.find_element(By.XPATH,"//dx[@bookmark='Save']").shadow_root
root2=root1.find_element(By.XPATH,".//dx-container/div")
Tried that but didn't work for some reason.
Site looks like this:
<div class="_cell symbolName" role="cell" draggable="true" tabindex="0"><set-class binding="this.flags.symbolName" target=".."></set-class><text-binding fallbackvalue=" " binding="this.symbolName"></text-binding></div>
#shadow-root(open) == $0
"Text I want"
How would I get that element? Any clues?
Edit: Just saw there is another shadow-root element further up