|
| 1 | +from seleniumbase import BaseCase |
| 2 | + |
| 3 | + |
| 4 | +class MyTourClass(BaseCase): |
| 5 | + |
| 6 | + def test_google_maps_tour(self): |
| 7 | + self.open("https://www.google.com/maps/@42.3598616,-71.0912631,15z") |
| 8 | + self.wait_for_element("#searchboxinput") |
| 9 | + self.wait_for_element("#minimap") |
| 10 | + self.wait_for_element("#zoom") |
| 11 | + |
| 12 | + self.create_tour(theme="introjs") |
| 13 | + self.add_tour_step("Welcome to Google Maps!", |
| 14 | + title="✅ SeleniumBase Tours 🌎") |
| 15 | + self.add_tour_step("Type in a location here.", "#searchboxinput", |
| 16 | + title="Search Box") |
| 17 | + self.add_tour_step("Then click here to show it on the map.", |
| 18 | + "#searchbox-searchbutton", alignment="bottom") |
| 19 | + self.add_tour_step("Or click here to get driving directions.", |
| 20 | + "#searchbox-directions", alignment="bottom") |
| 21 | + self.add_tour_step("Use this button to switch to Satellite view.", |
| 22 | + "#minimap div.widget-minimap", alignment="right") |
| 23 | + self.add_tour_step("Click here to zoom in.", "#widget-zoom-in", |
| 24 | + alignment="left") |
| 25 | + self.add_tour_step("Or click here to zoom out.", "#widget-zoom-out", |
| 26 | + alignment="left") |
| 27 | + self.add_tour_step("Use the Menu button to see more options.", |
| 28 | + ".searchbox-hamburger-container", alignment="right") |
| 29 | + self.add_tour_step("Or click here to see more Google apps.", |
| 30 | + '[title="Google apps"]', alignment="left") |
| 31 | + self.add_tour_step("Thanks for using SeleniumBase Tours!", |
| 32 | + title="🚃 End of Guided Tour 🚃") |
| 33 | + self.export_tour(filename="google_maps_introjs_tour.js") |
| 34 | + self.play_tour() |
0 commit comments