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))
# Wait for results frame to load
WebDriverWait(
driver, timeout=60).until(
EC.frame_to_be_available_and_switch_to_it('gwgwlf_org'))
wait_for_element(driver, By.ID, 'gwgwlf_org')
driver.switch_to.frame('gwgwlf_org')
# Wait until body text of iframe has loaded
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"]')
# 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()
WebDriverWait(
driver, timeout=60).until(
EC.frame_to_be_available_and_switch_to_it('gwgwcf_org'))
wait_for_element(driver, By.ID, 'gwgwcf_org')
driver.switch_to.frame('gwgwcf_org')
wait_for_element(driver, By.ID, 'submit')
# Get output select controls

Loading…
Cancel
Save