@@ -6,28 +6,36 @@ class MyTourClass(BaseCase):
66 def test_google_tour (self ):
77 self .open ('https://google.com' )
88 self .wait_for_element ('input[title="Search"]' )
9+ try :
10+ # Remove the Privacy Checkup box if present.
11+ self .assert_text ('Privacy Checkup' , '[role="dialog"]' , timeout = 2 )
12+ self .click ('link=NO, THANKS' )
13+ except Exception :
14+ pass # Google may have removed the Privacy Checkup. Continue.
915 self .create_tour (theme = "dark" )
1016 self .add_tour_step ("Click to begin the Google Tour!" ,
1117 title = "SeleniumBase Guided Tours" )
1218 self .add_tour_step ("Type in your search query here." ,
1319 'input[title="Search"]' )
14- self .add_tour_step ("Then click here to search!" ,
15- 'input[value="Google Search"]' ,
16- alignment = "bottom" , theme = "arrows" )
17- self .add_tour_step ("Or click here to see the top result." ,
18- '''[value="I'm Feeling Lucky"]''' ,
19- alignment = "bottom" , theme = "arrows" )
20+ self .add_tour_step (
21+ "Then click here to search!" , 'input[value="Google Search"]' ,
22+ alignment = "bottom" , theme = "arrows" )
23+ self .add_tour_step (
24+ "Or click here to see the top result." ,
25+ '''[value="I'm Feeling Lucky"]''' ,
26+ alignment = "bottom" , theme = "arrows" )
2027 self .add_tour_step ("Here's an example Google search..." ,
2128 theme = "arrows" )
22- self .play_tour ()
29+ self .play_tour (interval = 0 ) # If interval is 0, tour is fully manual
2330
2431 self .highlight_update_text ('input[title="Search"]' , "GitHub" )
2532 self .highlight_click ('input[value="Google Search"]' )
2633 self .create_tour (theme = "dark" )
27- self .add_tour_step ("Voila! Search results appear here!" )
34+ self .add_tour_step ("Search results appear here!" ,
35+ title = "(5-second autoplay on)" )
2836 self .add_tour_step ("Let's take another tour..." ,
2937 title = "Ready for more?" , theme = "square" )
30- self .play_tour ()
38+ self .play_tour (interval = 5 ) # tour automatically continues after 3s
3139
3240 self .open ("https://www.google.com/maps/@42.3598616,-71.0912631,15z" )
3341 self .wait_for_element ('input#searchboxinput' )
@@ -53,4 +61,4 @@ def test_google_tour(self):
5361 '[title="Google apps"]' , alignment = "left" )
5462 self .add_tour_step ("Thanks for trying out SeleniumBase tours!" ,
5563 title = "End of Guided Tour" , theme = "square" )
56- self .play_tour ()
64+ self .play_tour () # If interval isn't set, tour is fully manual
0 commit comments