@@ -6,59 +6,62 @@ 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
10
self .create_tour (theme = "dark" )
16
- self .add_tour_step ("Click to begin the Google Tour!" ,
17
- title = "SeleniumBase Guided Tours" )
18
- self .add_tour_step ("Type in your search query here." ,
19
- 'input[title="Search"]' )
11
+ self .add_tour_step (
12
+ "Click to begin the Google Tour!" , title = "SeleniumBase Tours" )
13
+ self .add_tour_step (
14
+ "Type in your search query here." , 'input[title="Search"]' )
20
15
self .add_tour_step (
21
16
"Then click here to search!" , 'input[value="Google Search"]' ,
22
17
alignment = "bottom" , theme = "arrows" )
23
18
self .add_tour_step (
24
19
"Or click here to see the top result." ,
25
20
'''[value="I'm Feeling Lucky"]''' ,
26
21
alignment = "bottom" , theme = "arrows" )
27
- self .add_tour_step ("Here's an example Google search..." ,
28
- theme = "arrows" )
22
+ self .add_tour_step ("Here's an example Google search:" , theme = "arrows" )
29
23
self .play_tour (interval = 0 ) # If interval is 0, tour is fully manual
30
24
31
25
self .highlight_update_text ('input[title="Search"]' , "GitHub" )
32
26
self .highlight_click ('input[value="Google Search"]' )
27
+
33
28
self .create_tour (theme = "dark" )
34
- self .add_tour_step ("Search results appear here!" ,
35
- title = "(5-second autoplay on)" )
36
- self .add_tour_step ("Let's take another tour..." ,
37
- title = "Ready for more?" , theme = "square" )
29
+ self .add_tour_step (
30
+ "Search results appear here!" , title = "(5-second autoplay on)" )
31
+ self .add_tour_step (
32
+ "Let's take another tour..." ,
33
+ title = "Ready for more?" , theme = "square" )
38
34
self .play_tour (interval = 5 ) # tour automatically continues after 3s
39
35
40
36
self .open ("https://www.google.com/maps/@42.3598616,-71.0912631,15z" )
41
37
self .wait_for_element ('input#searchboxinput' )
38
+
42
39
self .create_tour (theme = "dark" )
43
- self .add_tour_step ("Welcome to Google Maps!" )
44
- self .add_tour_step ("Type in a location here." ,
45
- "#searchboxinput" , title = "Search Box" )
46
- self .add_tour_step ("Then click here to show it on the map." ,
47
- "#searchbox-searchbutton" , alignment = "bottom" )
48
- self .add_tour_step ("Or click here to get driving directions." ,
49
- "#searchbox-directions" ,
50
- alignment = "bottom" , theme = "square-dark" )
51
- self .add_tour_step ("Use this button to switch to Satellite view." ,
52
- "div.widget-minimap" , alignment = "right" )
53
- self .add_tour_step ("Click here to zoom in." ,
54
- "#widget-zoom-in" , alignment = "left" )
55
- self .add_tour_step ("Or click here to zoom out." ,
56
- "#widget-zoom-out" ,
57
- alignment = "left" , theme = "default" )
58
- self .add_tour_step ("Use the Menu button to see more options." ,
59
- ".searchbox-hamburger-container" , alignment = "right" )
60
- self .add_tour_step ("Or click here to see more Google apps." ,
61
- '[title="Google apps"]' , alignment = "left" )
62
- self .add_tour_step ("Thanks for trying out SeleniumBase tours!" ,
63
- title = "End of Guided Tour" , theme = "square" )
40
+ self .add_tour_step (
41
+ "Welcome to Google Maps!" )
42
+ self .add_tour_step (
43
+ "Type in a location here." , "#searchboxinput" , title = "Search Box" )
44
+ self .add_tour_step (
45
+ "Then click here to show it on the map." ,
46
+ "#searchbox-searchbutton" , alignment = "bottom" )
47
+ self .add_tour_step (
48
+ "Or click here to get driving directions." ,
49
+ "#searchbox-directions" , alignment = "bottom" , theme = "square-dark" )
50
+ self .add_tour_step (
51
+ "Use this button to switch to Satellite view." ,
52
+ "div.widget-minimap" , alignment = "right" )
53
+ self .add_tour_step (
54
+ "Click here to zoom in." , "#widget-zoom-in" , alignment = "left" )
55
+ self .add_tour_step (
56
+ "Or click here to zoom out." , "#widget-zoom-out" ,
57
+ alignment = "left" , theme = "default" )
58
+ self .add_tour_step (
59
+ "Use the Menu button to see more options." ,
60
+ ".searchbox-hamburger-container" , alignment = "right" )
61
+ self .add_tour_step (
62
+ "Or click here to see more Google apps." , '[title="Google apps"]' ,
63
+ alignment = "left" )
64
+ self .add_tour_step (
65
+ "Thanks for trying out SeleniumBase Tours!" ,
66
+ title = "End of Guided Tour" , theme = "square" )
64
67
self .play_tour () # If interval isn't set, tour is fully manual
0 commit comments