Update examples

This commit is contained in:
Michael Mintz 2021-10-22 16:26:40 -04:00
parent eb1d0f388a
commit 7c598e1337
7 changed files with 42 additions and 51 deletions

View File

@ -34,9 +34,9 @@ class MyTourClass(BaseCase):
self.wait_for_element("#zoom", timeout=20)
self.create_bootstrap_tour()
self.add_tour_step("Welcome to Google Maps!")
self.add_tour_step("Welcome to Google Maps", title="SeleniumBase Tour")
self.add_tour_step(
"Type in a location here.", "#searchboxinput", title="Search Box"
"The location goes here.", "#searchboxinput", title="Search Box"
)
self.add_tour_step(
"Then click here to show it on the map.",
@ -45,12 +45,12 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Or click here to get driving directions.",
"#searchbox-directions",
'button[aria-label="Directions"]',
alignment="bottom",
)
self.add_tour_step(
"Use this button to switch to Satellite view.",
"div.widget-minimap-shim",
'button[jsaction*="minimap.main;"]',
alignment="right",
)
self.add_tour_step(
@ -61,7 +61,7 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Use the Menu button to see more options.",
".searchbox-hamburger-container",
'button[jsaction*="settings.open;"]',
alignment="right",
)
self.add_tour_step(
@ -70,7 +70,7 @@ class MyTourClass(BaseCase):
alignment="left",
)
self.add_tour_step(
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour"
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour",
)
self.export_tour(filename="bootstrap_google_maps_tour.js")
self.play_tour()

View File

@ -11,27 +11,23 @@ class MyTestClass(BaseCase):
# Create a website tour using the DriverJS library
# Same as: self.create_driverjs_tour()
self.create_tour(theme="driverjs")
self.add_tour_step("Welcome to Google Maps", title="SeleniumBase Tour")
self.add_tour_step(
"🗺️ Welcome to Google Maps 🗺️",
"html",
title="✅ SeleniumBase Tours 🌎",
"The location goes here.", "#searchboxinput", title="Search Box"
)
self.add_tour_step(
"You can type a location into this Search box.", "#searchboxinput"
)
self.add_tour_step(
"Then click here to view it on the map.",
"Then click here to show it on the map.",
"#searchbox-searchbutton",
alignment="bottom",
)
self.add_tour_step(
"Or click here to get driving directions.",
"#searchbox-directions",
'button[aria-label="Directions"]',
alignment="bottom",
)
self.add_tour_step(
"Use this button to get a Satellite view.",
"div.widget-minimap-shim",
"Use this button to switch to Satellite view.",
'button[jsaction*="minimap.main;"]',
alignment="right",
)
self.add_tour_step(
@ -41,8 +37,8 @@ class MyTestClass(BaseCase):
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
)
self.add_tour_step(
"Use the Menu button for more options.",
".searchbox-hamburger-container",
"Use the Menu button to see more options.",
'button[jsaction*="settings.open;"]',
alignment="right",
)
self.add_tour_step(
@ -51,9 +47,7 @@ class MyTestClass(BaseCase):
alignment="left",
)
self.add_tour_step(
"Thanks for using SeleniumBase Tours",
"html",
title="🚃 End of Guided Tour 🚃",
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour",
)
self.export_tour() # The default name for exports is "my_tour.js"
self.play_tour(interval=0) # If interval > 0, autoplay after N seconds

View File

@ -42,9 +42,9 @@ class MyTourClass(BaseCase):
# Create a website tour using the IntroJS library
# Same as: self.create_introjs_tour()
self.create_tour(theme="introjs")
self.add_tour_step("Welcome to Google Maps!")
self.add_tour_step("Welcome to Google Maps", title="SeleniumBase Tour")
self.add_tour_step(
"Type in a location here.", "#searchboxinput", title="Search Box"
"The location goes here.", "#searchboxinput", title="Search Box"
)
self.add_tour_step(
"Then click here to show it on the map.",
@ -53,12 +53,12 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Or click here to get driving directions.",
"#searchbox-directions",
'button[aria-label="Directions"]',
alignment="bottom",
)
self.add_tour_step(
"Use this button to switch to Satellite view.",
"div.widget-minimap-shim",
'button[jsaction*="minimap.main;"]',
alignment="right",
)
self.add_tour_step(
@ -69,7 +69,7 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Use the Menu button to see more options.",
".searchbox-hamburger-container",
'button[jsaction*="settings.open;"]',
alignment="right",
)
self.add_tour_step(
@ -78,7 +78,7 @@ class MyTourClass(BaseCase):
alignment="left",
)
self.add_tour_step(
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour"
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour",
)
self.export_tour() # The default name for exports is "my_tour.js"
self.play_tour()

View File

@ -34,9 +34,9 @@ class MyTourClass(BaseCase):
self.wait_for_element("#zoom", timeout=20)
self.create_hopscotch_tour()
self.add_tour_step("Welcome to Google Maps!")
self.add_tour_step("Welcome to Google Maps", title="SeleniumBase Tour")
self.add_tour_step(
"Type in a location here.", "#searchboxinput", title="Search Box"
"The location goes here.", "#searchboxinput", title="Search Box"
)
self.add_tour_step(
"Then click here to show it on the map.",
@ -45,12 +45,12 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Or click here to get driving directions.",
"#searchbox-directions",
'button[aria-label="Directions"]',
alignment="bottom",
)
self.add_tour_step(
"Use this button to switch to Satellite view.",
"div.widget-minimap-shim",
'button[jsaction*="minimap.main;"]',
alignment="right",
)
self.add_tour_step(
@ -61,7 +61,7 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Use the Menu button to see more options.",
".searchbox-hamburger-container",
'button[jsaction*="settings.open;"]',
alignment="right",
)
self.add_tour_step(
@ -70,7 +70,7 @@ class MyTourClass(BaseCase):
alignment="left",
)
self.add_tour_step(
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour"
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour",
)
self.export_tour(filename="hopscotch_google_maps_tour.js")
self.play_tour()

View File

@ -35,9 +35,9 @@ class MyTourClass(BaseCase):
self.set_introjs_colors("#f26721", "#db5409")
self.create_introjs_tour()
self.add_tour_step("Welcome to Google Maps!")
self.add_tour_step("Welcome to Google Maps", title="SeleniumBase Tour")
self.add_tour_step(
"Type in a location here.", "#searchboxinput", title="Search Box"
"The location goes here.", "#searchboxinput", title="Search Box"
)
self.add_tour_step(
"Then click here to show it on the map.",
@ -46,12 +46,12 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Or click here to get driving directions.",
"#searchbox-directions",
'button[aria-label="Directions"]',
alignment="bottom",
)
self.add_tour_step(
"Use this button to switch to Satellite view.",
"div.widget-minimap-shim",
'button[jsaction*="minimap.main;"]',
alignment="right",
)
self.add_tour_step(
@ -62,7 +62,7 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Use the Menu button to see more options.",
".searchbox-hamburger-container",
'button[jsaction*="settings.open;"]',
alignment="right",
)
self.add_tour_step(
@ -71,7 +71,7 @@ class MyTourClass(BaseCase):
alignment="left",
)
self.add_tour_step(
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour"
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour",
)
self.export_tour(filename="introjs_google_maps_tour.js")
self.play_tour()

View File

@ -9,11 +9,9 @@ class MyTourClass(BaseCase):
self.wait_for_element("#zoom", timeout=20)
self.create_tour(theme="introjs")
self.add_tour_step("Welcome to Google Maps", title="SeleniumBase Tour")
self.add_tour_step(
"Welcome to Google Maps!", title="✅ SeleniumBase Tours 🌎"
)
self.add_tour_step(
"Type in a location here.", "#searchboxinput", title="Search Box"
"The location goes here.", "#searchboxinput", title="Search Box"
)
self.add_tour_step(
"Then click here to show it on the map.",
@ -22,12 +20,12 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Or click here to get driving directions.",
"#searchbox-directions",
'button[aria-label="Directions"]',
alignment="bottom",
)
self.add_tour_step(
"Use this button to switch to Satellite view.",
"div.widget-minimap-shim",
'button[jsaction*="minimap.main;"]',
alignment="right",
)
self.add_tour_step(
@ -38,7 +36,7 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Use the Menu button to see more options.",
".searchbox-hamburger-container",
'button[jsaction*="settings.open;"]',
alignment="right",
)
self.add_tour_step(
@ -47,8 +45,7 @@ class MyTourClass(BaseCase):
alignment="left",
)
self.add_tour_step(
"Thanks for using SeleniumBase Tours!",
title="🚃 End of Guided Tour 🚃",
"Thanks for using SeleniumBase Tours!", title="End of Guided Tour",
)
self.export_tour(filename="maps_introjs_tour.js")
self.play_tour()

View File

@ -45,13 +45,13 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Or click here to get driving directions.",
"#searchbox-directions",
'button[aria-label="Directions"]',
alignment="bottom",
theme="dark",
)
self.add_tour_step(
"Use this button to switch to Satellite view.",
"div.widget-minimap-shim",
'button[jsaction*="minimap.main;"]',
alignment="right",
)
self.add_tour_step(
@ -65,7 +65,7 @@ class MyTourClass(BaseCase):
)
self.add_tour_step(
"Use the Menu button to see more options.",
".searchbox-hamburger-container",
'button[jsaction*="settings.open;"]',
alignment="right",
)
self.add_tour_step(