From 42b59fb9c8c6562f7f35fd7ad211b4ae7f52e62d Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Fri, 15 Feb 2019 09:23:28 +1100 Subject: [PATCH] Increase timeout duration to 60 s --- waternsw_grabber/waternsw_grabber.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/waternsw_grabber/waternsw_grabber.py b/waternsw_grabber/waternsw_grabber.py index ea9612a..617aadc 100644 --- a/waternsw_grabber/waternsw_grabber.py +++ b/waternsw_grabber/waternsw_grabber.py @@ -40,7 +40,7 @@ def return_to_master_frame(driver): driver.switch_to.frame(webhyd) -def wait_for_element(driver, by, x, timeout=30): +def wait_for_element(driver, by, x, timeout=60): try: element_present = EC.presence_of_element_located((by, x)) WebDriverWait(driver, timeout).until(element_present) @@ -61,7 +61,7 @@ def get_telemetered_bore(driver, bore_id, start_date, end_date): # Wait for results frame to load WebDriverWait( - driver, timeout=30).until( + driver, timeout=60).until( EC.frame_to_be_available_and_switch_to_it('gwgwlf_org')) # Wait until body text of iframe has loaded @@ -85,7 +85,7 @@ def get_telemetered_bore(driver, bore_id, start_date, end_date): driver.execute_script("menuloc.display_frame('gw','gwcf_org','1')") driver.switch_to.parent_frame() WebDriverWait( - driver, timeout=30).until( + driver, timeout=60).until( EC.frame_to_be_available_and_switch_to_it('gwgwcf_org')) wait_for_element(driver, By.ID, 'submit') @@ -137,7 +137,7 @@ def get_telemetered_bore(driver, bore_id, start_date, end_date): driver, By.XPATH, "//div[contains(@class, 'lity-container')]", - timeout=30) + timeout=60) webdriver.ActionChains(driver).send_keys(Keys.ESCAPE).perform()