@@ -741,7 +741,7 @@ def add_cookie(self, cookie_dict) -> None:
741
741
self .execute (Command .ADD_COOKIE , {'cookie' : cookie_dict })
742
742
743
743
# Timeouts
744
- def implicitly_wait (self , time_to_wait ) -> None :
744
+ def implicitly_wait (self , time_to_wait : float ) -> None :
745
745
"""
746
746
Sets a sticky timeout to implicitly wait for an element to be found,
747
747
or a command to complete. This method only needs to be called one
@@ -759,7 +759,7 @@ def implicitly_wait(self, time_to_wait) -> None:
759
759
self .execute (Command .SET_TIMEOUTS , {
760
760
'implicit' : int (float (time_to_wait ) * 1000 )})
761
761
762
- def set_script_timeout (self , time_to_wait ) -> None :
762
+ def set_script_timeout (self , time_to_wait : float ) -> None :
763
763
"""
764
764
Set the amount of time that the script should wait during an
765
765
execute_async_script call before throwing an error.
@@ -775,7 +775,7 @@ def set_script_timeout(self, time_to_wait) -> None:
775
775
self .execute (Command .SET_TIMEOUTS , {
776
776
'script' : int (float (time_to_wait ) * 1000 )})
777
777
778
- def set_page_load_timeout (self , time_to_wait ) -> None :
778
+ def set_page_load_timeout (self , time_to_wait : float ) -> None :
779
779
"""
780
780
Set the amount of time to wait for a page load to complete
781
781
before throwing an error.
@@ -826,7 +826,7 @@ def timeouts(self, timeouts) -> None:
826
826
"""
827
827
_ = self .execute (Command .SET_TIMEOUTS , timeouts ._to_json ())['value' ]
828
828
829
- def find_element (self , by = By .ID , value = None ) -> WebElement :
829
+ def find_element (self , by = By .ID , value : Optional [ str ] = None ) -> WebElement :
830
830
"""
831
831
Find an element given a By strategy and locator.
832
832
@@ -857,7 +857,7 @@ def find_element(self, by=By.ID, value=None) -> WebElement:
857
857
'using' : by ,
858
858
'value' : value })['value' ]
859
859
860
- def find_elements (self , by = By .ID , value = None ) -> List [WebElement ]:
860
+ def find_elements (self , by = By .ID , value : Optional [ str ] = None ) -> List [WebElement ]:
861
861
"""
862
862
Find elements given a By strategy and locator.
863
863
0 commit comments