@@ -25,22 +25,22 @@ class ShadowRoot:
25
25
26
26
# TODO: We should look and see how we can create a search context like Java/.NET
27
27
28
- def __init__ (self , session , id_ ):
28
+ def __init__ (self , session , id_ ) -> None :
29
29
self .session = session
30
30
self ._id = id_
31
31
32
- def __eq__ (self , other_shadowroot ):
32
+ def __eq__ (self , other_shadowroot ) -> bool :
33
33
return self ._id == other_shadowroot ._id
34
34
35
35
def __hash__ (self ) -> int :
36
36
return int (md5_hash (self ._id .encode ("utf-8" )).hexdigest (), 16 )
37
37
38
- def __repr__ (self ):
38
+ def __repr__ (self ) -> str :
39
39
return '<{0.__module__}.{0.__name__} (session="{1}", element="{2}")>' .format (
40
40
type (self ), self .session .session_id , self ._id
41
41
)
42
42
43
- def find_element (self , by : By = By .ID , value : str = None ):
43
+ def find_element (self , by : str = By .ID , value : str = None ):
44
44
if by == By .ID :
45
45
by = By .CSS_SELECTOR
46
46
value = '[id="%s"]' % value
@@ -55,7 +55,7 @@ def find_element(self, by: By = By.ID, value: str = None):
55
55
Command .FIND_ELEMENT_FROM_SHADOW_ROOT , {"using" : by , "value" : value }
56
56
)["value" ]
57
57
58
- def find_elements (self , by : By = By .ID , value : str = None ):
58
+ def find_elements (self , by : str = By .ID , value : str = None ):
59
59
if by == By .ID :
60
60
by = By .CSS_SELECTOR
61
61
value = '[id="%s"]' % value
0 commit comments