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()