Increase timeout
This commit is contained in:
parent
a5cca5f9c7
commit
f3640a1863
@ -12,7 +12,7 @@ from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
from selenium.webdriver.support.wait import WebDriverWait as Wait
|
||||
|
||||
timeout = 5
|
||||
timeout = 60
|
||||
base_url = "https://app.bathnes.gov.uk/webforms/planning"
|
||||
current_date = datetime.today().strftime('%Y-%m-%d')
|
||||
|
||||
@ -132,10 +132,10 @@ class Application:
|
||||
documents_button = Wait(browser, timeout=timeout).until(EC.element_to_be_clickable((By.ID, "tab_documents_Section")))
|
||||
documents_button.click()
|
||||
|
||||
documents_frame = Wait(browser, timeout=20).until(EC.visibility_of_element_located((By.ID, "iframe")))
|
||||
documents_frame = Wait(browser, timeout=timeout).until(EC.visibility_of_element_located((By.ID, "iframe")))
|
||||
browser.switch_to.frame(documents_frame)
|
||||
|
||||
Wait(browser, timeout=60).until(EC.none_of(EC.text_to_be_present_in_element((By.ID, "documents_info"), "No documents found")))
|
||||
Wait(browser, timeout=timeout).until(EC.none_of(EC.text_to_be_present_in_element((By.ID, "documents_info"), "No documents found")))
|
||||
new_num_documents = int(browser.find_element(by=By.ID, value="documents_info").text.split(" of ")[1].replace(" documents", ""))
|
||||
|
||||
browser.switch_to.default_content()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user