Skip to content

Commit b51d2a7

Browse files
committed
fix tests: remove unnecessary WebElement type hints from find_element and find_elements methods
1 parent 235608f commit b51d2a7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

py/selenium/webdriver/remote/shadowroot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from selenium.common.exceptions import InvalidSelectorException
2121
from selenium.webdriver.common.by import By
2222
from selenium.webdriver.remote.command import Command
23-
from selenium.webdriver.remote.webelement import WebElement
2423

2524

2625
class ShadowRoot:
@@ -45,7 +44,7 @@ def __repr__(self) -> str:
4544
def id(self) -> str:
4645
return self._id
4746

48-
def find_element(self, by: str = By.ID, value: str = None) -> WebElement:
47+
def find_element(self, by: str = By.ID, value: str = None):
4948
"""Find an element inside a shadow root given a By strategy and
5049
locator.
5150
@@ -81,7 +80,7 @@ def find_element(self, by: str = By.ID, value: str = None) -> WebElement:
8180

8281
return self._execute(Command.FIND_ELEMENT_FROM_SHADOW_ROOT, {"using": by, "value": value})["value"]
8382

84-
def find_elements(self, by: str = By.ID, value: str = None) -> list[WebElement]:
83+
def find_elements(self, by: str = By.ID, value: str = None) -> list:
8584
"""Find elements inside a shadow root given a By strategy and locator.
8685
8786
Args:

0 commit comments

Comments
 (0)