This repository was archived by the owner on Jun 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 15
15
from selenium import webdriver
16
16
from selenium .webdriver .common .keys import Keys
17
17
from selenium .common .exceptions import InvalidElementStateException
18
+ from selenium .webdriver .common .by import By
19
+ from selenium .webdriver .support .ui import WebDriverWait
20
+ from selenium .webdriver .support import expected_conditions as EC
18
21
19
22
from textwrap import dedent
20
23
try :
@@ -518,15 +521,18 @@ def render_content(tab):
518
521
tab_one = self .wait_for_element_by_css_selector ('#tab-1' )
519
522
tab_two = self .wait_for_element_by_css_selector ('#tab-2' )
520
523
524
+ WebDriverWait (self .driver , 10 ).until (
525
+ EC .element_to_be_clickable ((By .ID , "tab-1" )),
526
+ EC .element_to_be_clickable ((By .ID , "tab-2" ))
527
+ )
528
+
521
529
self .snapshot ("Tabs with Graph - initial (graph should not resize)" )
522
530
523
531
tab_two .click ()
524
- time .sleep (1 )
525
532
526
533
self .snapshot ("Tabs with Graph - clicked tab 2 (graph should not resize)" )
527
534
528
535
tab_one .click ()
529
- time .sleep (1 )
530
536
531
537
self .snapshot ("Tabs with Graph - clicked tab 1 (graph should not resize)" )
532
538
You can’t perform that action at this time.
0 commit comments