Use consistent function for waits

master
Dan Howe 6 years ago
parent a9dccc6bbc
commit ad131de6b1

@ -74,9 +74,8 @@ def get_telemetered_bore(driver, bore_id, start_date, end_date):
driver.execute_script("go('{}','gw', 1)".format(bore_id)) driver.execute_script("go('{}','gw', 1)".format(bore_id))
# Wait for results frame to load # Wait for results frame to load
WebDriverWait( wait_for_element(driver, By.ID, 'gwgwlf_org')
driver, timeout=60).until( driver.switch_to.frame('gwgwlf_org')
EC.frame_to_be_available_and_switch_to_it('gwgwlf_org'))
# Wait until body text of iframe has loaded # Wait until body text of iframe has loaded
body_text = None body_text = None
@ -98,11 +97,10 @@ def get_telemetered_bore(driver, bore_id, start_date, end_date):
wait_for_element(driver, By.XPATH, '//*[@id="tabstext"]') wait_for_element(driver, By.XPATH, '//*[@id="tabstext"]')
# Activate outputs tab, and wait for 'Get Output' button # Activate outputs tab, and wait for 'Get Output' button
driver.execute_script("menuloc.display_frame('gw','gwcf_org','1')") driver.execute_script(menuloc.display_frame('gw','gwcf_org','1'))
driver.switch_to.parent_frame() driver.switch_to.parent_frame()
WebDriverWait( wait_for_element(driver, By.ID, 'gwgwcf_org')
driver, timeout=60).until( driver.switch_to.frame('gwgwcf_org')
EC.frame_to_be_available_and_switch_to_it('gwgwcf_org'))
wait_for_element(driver, By.ID, 'submit') wait_for_element(driver, By.ID, 'submit')
# Get output select controls # Get output select controls

Loading…
Cancel
Save