File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
py/selenium/webdriver/remote Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -235,20 +235,12 @@ def send_keys(self, *value) -> None:
235
235
@property
236
236
def shadow_root (self ) -> ShadowRoot :
237
237
"""Returns a shadow root of the element if there is one or an error.
238
- Only works from Chromium 96 and Firefox 96 onwards. Previous versions
239
- of browsers will throw an assertion exception.
238
+ Only works from Chromium 96, Firefox 96, and Safari 16.4 onwards.
240
239
241
240
:Returns:
242
241
- ShadowRoot object or
243
242
- NoSuchShadowRoot - if no shadow root was attached to element
244
243
"""
245
- browser_main_version = int (self ._parent .caps ["browserVersion" ].split ("." )[0 ])
246
- assert (
247
- self ._parent .caps ["browserName" ].lower () != "safari"
248
- ), "This only currently works in Firefox and Chromium based browsers"
249
- assert (
250
- browser_main_version > 95
251
- ), f"Please use Firefox or Chromium based browsers with version 96 or later. Version used { self ._parent .caps ['browserVersion' ]} "
252
244
return self ._execute (Command .GET_SHADOW_ROOT )["value" ]
253
245
254
246
# RenderedWebElement Items
You can’t perform that action at this time.
0 commit comments