Speed up waiting for elements not present on remote webdriver sessions.

This commit is contained in:
Jay Zoldak
2013-09-19 11:51:34 -04:00
parent 20ea28748b
commit 002f3ef9e2
4 changed files with 18 additions and 8 deletions

View File

@@ -23,9 +23,12 @@ def lti_is_not_rendered(_step):
with world.browser.get_iframe('ltiLaunchFrame') as iframe:
# iframe does not contain functions from terrain/ui_helpers.py
world.browser.driver.implicitly_wait(1)
result = iframe.is_element_not_present_by_css('.result', wait_time=1)
world.browser.driver.implicitly_wait(world.IMPLICIT_WAIT)
assert result
try:
assert iframe.is_element_not_present_by_css('.result', wait_time=1)
except:
raise
finally:
world.browser.driver.implicitly_wait(world.IMPLICIT_WAIT)
@step('I view the LTI and it is rendered$')