Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 6fca822

Browse files
Wait for content to be loaded in tabs tests
1 parent 056e3a0 commit 6fca822

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/test_integration.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,19 @@ def on_click(n_clicks):
539539

540540
button_one.click()
541541

542+
# wait for tabs to be loaded after clicking
543+
WebDriverWait(self.driver, 10).until(
544+
EC.visibility_of_element_located((By.ID, "tabs-one"))
545+
)
546+
542547
self.snapshot("Tabs 1 rendered ")
543548

544549
button_two.click()
545-
time.sleep(1)
550+
551+
# wait for tabs to be loaded after clicking
552+
WebDriverWait(self.driver, 10).until(
553+
EC.visibility_of_element_located((By.ID, "tabs-two"))
554+
)
546555

547556
self.snapshot("Tabs 2 rendered ")
548557

0 commit comments

Comments
 (0)