You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a time.sleep to this function can prevent the browser from slowing down and the logo being output has not been loaded. This situation often occurs on computers with poor performance.
def wait_to_disappear(self, by, query, sleep_duration=1):
'''
Waits until the specified web element disappears from the page.
This function continuously checks for the presence of a web element.
It waits until the element is no longer present on the page.
Once the element has disappeared, the function returns.
Args:
by (selenium.webdriver.common.by.By): The method used to locate the element.
query (str): The query string to locate the element.
sleep_duration (int, optional): The duration to sleep between checks. Default: 1.
Returns:
None
'''
!!!!!!!!!!!!here!!!!!!
time.sleep(1)
!!!!!!!!!!!! here !!!!!!!!
while True:
thinking = self.browser.find_elements(by, query)
if len(thinking) == 0:
logging.info(f'Element {query} is present, waiting')
break
time.sleep(sleep_duration)
return
The text was updated successfully, but these errors were encountered:
Adding a time.sleep to this function can prevent the browser from slowing down and the logo being output has not been loaded. This situation often occurs on computers with poor performance.
def wait_to_disappear(self, by, query, sleep_duration=1):
'''
Waits until the specified web element disappears from the page.
The text was updated successfully, but these errors were encountered: