@@ -1061,7 +1061,8 @@ def wait_for_downloads(self, timeout: int = 120000):
10611061 # waits for all the files to be completed
10621062 WebDriverWait (self ._driver , timeout / 1000.0 , 1 ).until (wait_method )
10631063
1064- def find_elements (self , selector : str , by : By = By .CSS_SELECTOR , waiting_time = 10000 , ensure_visible : bool = True ) -> List [WebElement ]:
1064+ def find_elements (self , selector : str , by : By = By .CSS_SELECTOR ,
1065+ waiting_time = 10000 , ensure_visible : bool = True ) -> List [WebElement ]:
10651066 """Find elements using the specified selector with selector type specified by `by`.
10661067
10671068 Args:
@@ -1084,7 +1085,10 @@ def find_elements(self, selector: str, by: By = By.CSS_SELECTOR, waiting_time=10
10841085 ...
10851086 ```
10861087 """
1087- condition = EC .visibility_of_all_elements_located if ensure_visible else EC .presence_of_all_elements_located
1088+ if ensure_visible :
1089+ condition = EC .visibility_of_all_elements_located
1090+ else :
1091+ condition = EC .presence_of_all_elements_located
10881092
10891093 try :
10901094 elements = WebDriverWait (
@@ -1097,7 +1101,8 @@ def find_elements(self, selector: str, by: By = By.CSS_SELECTOR, waiting_time=10
10971101 print ("Exception on find_elements" , ex )
10981102 return None
10991103
1100- def find_element (self , selector : str , by : str = By .CSS_SELECTOR , waiting_time = 10000 , ensure_visible : bool = False , ensure_clickable : bool = False ) -> WebElement :
1104+ def find_element (self , selector : str , by : str = By .CSS_SELECTOR , waiting_time = 10000 ,
1105+ ensure_visible : bool = False , ensure_clickable : bool = False ) -> WebElement :
11011106 """Find an element using the specified selector with selector type specified by `by`.
11021107 If more than one element is found, the first instance is returned.
11031108
0 commit comments