Skip to content

Commit 050feb0

Browse files
committed
Revert changes in shadowroot.py
1 parent d8c871a commit 050feb0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

py/selenium/webdriver/remote/shadowroot.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,9 @@
1616
# under the License.
1717

1818
from hashlib import md5 as md5_hash
19-
from typing import List
20-
from typing import Optional
21-
from typing import Union
2219

2320
from ..common.by import By
24-
from ..common.by import ByType
25-
from ..support.relative_locator import RelativeBy
2621
from .command import Command
27-
from .webelement import WebElement
2822

2923

3024
class ShadowRoot:
@@ -45,7 +39,7 @@ def __repr__(self) -> str:
4539
type(self), self.session.session_id, self._id
4640
)
4741

48-
def find_element(self, by: Union[ByType, RelativeBy] = By.ID, value: Optional[str] = None) -> WebElement:
42+
def find_element(self, by: str = By.ID, value: str = None):
4943
"""Find an element inside a shadow root given a By strategy and
5044
locator.
5145
@@ -84,7 +78,7 @@ def find_element(self, by: Union[ByType, RelativeBy] = By.ID, value: Optional[st
8478

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

87-
def find_elements(self, by: Union[ByType, RelativeBy] = By.ID, value: Optional[str] = None) -> List[WebElement]:
81+
def find_elements(self, by: str = By.ID, value: str = None):
8882
"""Find elements inside a shadow root given a By strategy and locator.
8983
9084
Parameters:

0 commit comments

Comments
 (0)