How to access shadow element with Driver() #2503
-
Hello, I'm trying to access an iframe within a shadow element: I'm aware that SeleniumBase has a I tried I've seen the shadow_root_test.py and test_shadow_dom.py examples, but those are using BaseCase. On another note, I'm also wondering if the methods listed at https://seleniumbase.io/help_docs/method_summary/ are supposed to be able to be used by the Driver() object? I've tried some of them with the Driver() object but some of them don't work for me. I'm assuming that those ones aren't meant for the Driver() object and that I'm misunderstanding when or why the Driver() object should be used. My apologies if this seems trivial, I'm still trying to understand how to effectively use SeleniumBase. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The The method_summary methods are mainly just for # "driver"-specific methods added by SeleniumBase`. |
Beta Was this translation helpful? Give feedback.
The
::shadow
selector only works onopen
shadow-root elements. From your screenshot, it looks like you're dealing with aclosed
shadow-root element, which isn't reachable. Info: SeleniumHQ/selenium#5869 (comment)The method_summary methods are mainly just for
BaseCase
andSB()
formats. If you scroll to the bottom of that page, you'll find a section forDriver()
methods:# "driver"-specific methods added by SeleniumBase`.