Skip to content
Snippets Groups Projects
Commit 1aab80f2 authored by Hague Matthew UXAC009's avatar Hague Matthew UXAC009
Browse files

Fix broken timing expansion

For some reason the clicks sometimes have no effect. Possibly async
javascript loading or similar. Keep clicking until the section is open.
parent f7043e76
Branches
No related tags found
No related merge requests found
......@@ -152,13 +152,18 @@ def update_quiz(
# Open edit timing section
browser.driver.get(get_quiz_edit_url(quiz))
expander = browser.driver.find_element(
By.CSS_SELECTOR, "#id_timing .ftoggler a"
)
WebDriverWait(browser.driver, WAIT_TIMEOUT).until(
ec.element_to_be_clickable(expander)
)
expander.click()
check_box = None
expanded = False
while not expanded:
expander.click()
check_box = browser.driver.find_element(
By.CSS_SELECTOR, f"#id_time{mode}_enabled"
)
expanded = check_box.is_displayed()
# Make sure open/close quiz checkbox matches notime
check_box = browser.driver.find_element(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment