Update Tour examples
This commit is contained in:
parent
efa46b80a2
commit
7e9b0fb13a
|
@ -61,11 +61,18 @@ class MyTourClass(BaseCase):
|
|||
self.add_tour_step(
|
||||
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
|
||||
)
|
||||
if self.is_element_visible('button[jsaction*="settings.open;"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction*="settings.open;"]',
|
||||
alignment="right",
|
||||
)
|
||||
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction="navigationrail.more"]',
|
||||
alignment="right",
|
||||
)
|
||||
self.add_tour_step(
|
||||
"Or click here to see more Google apps.",
|
||||
'[title="Google apps"]',
|
||||
|
|
|
@ -16,5 +16,5 @@ class MyTestClass(BaseCase):
|
|||
self.add_tour_step("Learn about the author here.", 'a[rel="author"]')
|
||||
self.add_tour_step("Click for a random comic.", 'a[href*="/random/"]')
|
||||
self.add_tour_step("Thanks for taking this tour!")
|
||||
self.export_tour(filename="bootstrap_xkcd_tour.js") # Exports the tour
|
||||
self.play_tour() # Plays the tour
|
||||
self.export_tour(filename="bootstrap_xkcd_tour.js")
|
||||
self.play_tour()
|
||||
|
|
|
@ -37,11 +37,18 @@ class MyTestClass(BaseCase):
|
|||
self.add_tour_step(
|
||||
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
|
||||
)
|
||||
if self.is_element_visible('button[jsaction*="settings.open;"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction*="settings.open;"]',
|
||||
alignment="right",
|
||||
)
|
||||
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction="navigationrail.more"]',
|
||||
alignment="right",
|
||||
)
|
||||
self.add_tour_step(
|
||||
"Or click here to see more Google apps.",
|
||||
'[title="Google apps"]',
|
||||
|
|
|
@ -69,11 +69,18 @@ class MyTourClass(BaseCase):
|
|||
self.add_tour_step(
|
||||
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
|
||||
)
|
||||
if self.is_element_visible('button[jsaction*="settings.open;"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction*="settings.open;"]',
|
||||
alignment="right",
|
||||
)
|
||||
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction="navigationrail.more"]',
|
||||
alignment="right",
|
||||
)
|
||||
self.add_tour_step(
|
||||
"Or click here to see more Google apps.",
|
||||
'[title="Google apps"]',
|
||||
|
|
|
@ -61,11 +61,18 @@ class MyTourClass(BaseCase):
|
|||
self.add_tour_step(
|
||||
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
|
||||
)
|
||||
if self.is_element_visible('button[jsaction*="settings.open;"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction*="settings.open;"]',
|
||||
alignment="right",
|
||||
)
|
||||
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction="navigationrail.more"]',
|
||||
alignment="right",
|
||||
)
|
||||
self.add_tour_step(
|
||||
"Or click here to see more Google apps.",
|
||||
'[title="Google apps"]',
|
||||
|
|
|
@ -62,11 +62,18 @@ class MyTourClass(BaseCase):
|
|||
self.add_tour_step(
|
||||
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
|
||||
)
|
||||
if self.is_element_visible('button[jsaction*="settings.open;"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction*="settings.open;"]',
|
||||
alignment="right",
|
||||
)
|
||||
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction="navigationrail.more"]',
|
||||
alignment="right",
|
||||
)
|
||||
self.add_tour_step(
|
||||
"Or click here to see more Google apps.",
|
||||
'[title="Google apps"]',
|
||||
|
|
|
@ -37,11 +37,18 @@ class MyTourClass(BaseCase):
|
|||
self.add_tour_step(
|
||||
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
|
||||
)
|
||||
if self.is_element_visible('button[jsaction*="settings.open;"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction*="settings.open;"]',
|
||||
alignment="right",
|
||||
)
|
||||
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction="navigationrail.more"]',
|
||||
alignment="right",
|
||||
)
|
||||
self.add_tour_step(
|
||||
"Or click here to see more Google apps.",
|
||||
'[title="Google apps"]',
|
||||
|
|
|
@ -65,11 +65,18 @@ class MyTourClass(BaseCase):
|
|||
alignment="left",
|
||||
theme="light",
|
||||
)
|
||||
if self.is_element_visible('button[jsaction*="settings.open;"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction*="settings.open;"]',
|
||||
alignment="right",
|
||||
)
|
||||
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
|
||||
self.add_tour_step(
|
||||
"Use the Menu button to see more options.",
|
||||
'button[jsaction="navigationrail.more"]',
|
||||
alignment="right",
|
||||
)
|
||||
self.add_tour_step(
|
||||
"Or click here to see more Google apps.",
|
||||
'[title="Google apps"]',
|
||||
|
|
|
@ -17,5 +17,5 @@ class MyTestClass(BaseCase):
|
|||
self.add_tour_step("Click here for the license.", 'a[rel="license"]')
|
||||
self.add_tour_step("Click for a random comic.", 'a[href*="/random/"]')
|
||||
self.add_tour_step("Thanks for taking this tour!")
|
||||
self.export_tour(filename="xkcd_tour.js") # Exports the tour
|
||||
self.play_tour() # Plays the tour
|
||||
self.export_tour(filename="xkcd_tour.js")
|
||||
self.play_tour()
|
||||
|
|
Loading…
Reference in New Issue