Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98369

Issues navigating down shadow root using python

$
0
0

I'm currently using python and going down the root, but ran into a problem and now I'm stuck. I cant seem to get down and expand. enter image description here

I've tried

#root5 = shadow_root4.find_element_by_tag_selector('settings-on-startup-page')
#root5 = shadow_root4.find_element_by_id('settings-on-startup-page')
#root5 = shadow_root4.find_element_by_name('settings-on-startup-page')
#root5 = shadow_root4.find_element_by_xpath('//*[@id="basicPage"]/settings-section[6]/settings-on-startup-page')
#root5 = shadow_root4.find_element_by_link_text('settings-on-startup-page')
#root5 = shadow_root4.find_element_by_partial_link_text('settings-on-startup-page')
#root5 = shadow_root4.find_element_by_tag_name('settings-on-startup-page')
#root5 = shadow_root4.find_element_by_class_name('settings-on-startup-page')
#root5 = shadow_root4.find_element_by_css_selector('settings-on-startup-page')
#shadow_root5 = expand_shadow_element(root5)

and they all failed, normally by tag usally has been working up until now.

root1 = cdriver.find_element_by_tag_name('settings-ui')
shadow_root1 = expand_shadow_element(root1)

root2 = shadow_root1.find_element_by_id('main')
shadow_root2 = expand_shadow_element(root2)

The error message just keeps saying Message: no such element: Unable to locate element: {"method":"css selector","selector":"settings-on-startup-page and after expanding the previous shadow-root thats the only one that I can select after.

root3 = shadow_root2.find_element_by_tag_name('settings-basic-page')
shadow_root3 = expand_shadow_element(root3)

root4 = shadow_root3.find_element_by_css_selector('[section = "onStartup"]')
shadow_root4 = expand_shadow_element(root4)

Viewing all articles
Browse latest Browse all 98369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>