@@ -25,22 +25,22 @@ class ShadowRoot:
2525
2626 # TODO: We should look and see how we can create a search context like Java/.NET
2727
28- def __init__ (self , session , id_ ):
28+ def __init__ (self , session , id_ ) -> None :
2929 self .session = session
3030 self ._id = id_
3131
32- def __eq__ (self , other_shadowroot ):
32+ def __eq__ (self , other_shadowroot ) -> bool :
3333 return self ._id == other_shadowroot ._id
3434
3535 def __hash__ (self ) -> int :
3636 return int (md5_hash (self ._id .encode ("utf-8" )).hexdigest (), 16 )
3737
38- def __repr__ (self ):
38+ def __repr__ (self ) -> str :
3939 return '<{0.__module__}.{0.__name__} (session="{1}", element="{2}")>' .format (
4040 type (self ), self .session .session_id , self ._id
4141 )
4242
43- def find_element (self , by : By = By .ID , value : str = None ):
43+ def find_element (self , by : str = By .ID , value : str = None ):
4444 if by == By .ID :
4545 by = By .CSS_SELECTOR
4646 value = '[id="%s"]' % value
@@ -55,7 +55,7 @@ def find_element(self, by: By = By.ID, value: str = None):
5555 Command .FIND_ELEMENT_FROM_SHADOW_ROOT , {"using" : by , "value" : value }
5656 )["value" ]
5757
58- def find_elements (self , by : By = By .ID , value : str = None ):
58+ def find_elements (self , by : str = By .ID , value : str = None ):
5959 if by == By .ID :
6060 by = By .CSS_SELECTOR
6161 value = '[id="%s"]' % value
0 commit comments