@@ -6,28 +6,36 @@ class MyTourClass(BaseCase):
6
6
def test_google_tour (self ):
7
7
self .open ('https://google.com' )
8
8
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.
9
15
self .create_tour (theme = "dark" )
10
16
self .add_tour_step ("Click to begin the Google Tour!" ,
11
17
title = "SeleniumBase Guided Tours" )
12
18
self .add_tour_step ("Type in your search query here." ,
13
19
'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" )
20
27
self .add_tour_step ("Here's an example Google search..." ,
21
28
theme = "arrows" )
22
- self .play_tour ()
29
+ self .play_tour (interval = 0 ) # If interval is 0, tour is fully manual
23
30
24
31
self .highlight_update_text ('input[title="Search"]' , "GitHub" )
25
32
self .highlight_click ('input[value="Google Search"]' )
26
33
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)" )
28
36
self .add_tour_step ("Let's take another tour..." ,
29
37
title = "Ready for more?" , theme = "square" )
30
- self .play_tour ()
38
+ self .play_tour (interval = 5 ) # tour automatically continues after 3s
31
39
32
40
self .open ("https://www.google.com/maps/@42.3598616,-71.0912631,15z" )
33
41
self .wait_for_element ('input#searchboxinput' )
@@ -53,4 +61,4 @@ def test_google_tour(self):
53
61
'[title="Google apps"]' , alignment = "left" )
54
62
self .add_tour_step ("Thanks for trying out SeleniumBase tours!" ,
55
63
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