|
| 1 | +from seleniumbase import BaseCase |
| 2 | + |
| 3 | + |
| 4 | +class MyTourClass(BaseCase): |
| 5 | + |
| 6 | + def test_google_tour(self): |
| 7 | + self.open('https://google.com') |
| 8 | + self.wait_for_element('input[title="Search"]') |
| 9 | + self.create_tour(theme="dark") |
| 10 | + self.add_tour_step("Click to begin the Google Tour!", |
| 11 | + title="SeleniumBase Guided Tours") |
| 12 | + self.add_tour_step("Type in your search query here.", |
| 13 | + '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("Here's an example Google search...", |
| 21 | + theme="arrows") |
| 22 | + self.play_tour() |
| 23 | + |
| 24 | + self.highlight_update_text('input[title="Search"]', "GitHub") |
| 25 | + self.highlight_click('input[value="Google Search"]') |
| 26 | + self.create_tour(theme="dark") |
| 27 | + self.add_tour_step("Voila! Search results appear here!") |
| 28 | + self.add_tour_step("Let's take another tour...", |
| 29 | + title="Ready for more?", theme="square") |
| 30 | + self.play_tour() |
| 31 | + |
| 32 | + self.open("https://www.google.com/maps/@42.3598616,-71.0912631,15z") |
| 33 | + self.wait_for_element('input#searchboxinput') |
| 34 | + self.create_tour(theme="dark") |
| 35 | + self.add_tour_step("Welcome to Google Maps!") |
| 36 | + self.add_tour_step("Type in a location here.", |
| 37 | + "#searchboxinput", title="Search Box") |
| 38 | + self.add_tour_step("Then click here to show it on the map.", |
| 39 | + "#searchbox-searchbutton", alignment="bottom") |
| 40 | + self.add_tour_step("Or click here to get driving directions.", |
| 41 | + "#searchbox-directions", |
| 42 | + alignment="bottom", theme="square-dark") |
| 43 | + self.add_tour_step("Use this button to switch to Satellite view.", |
| 44 | + "div.widget-minimap", alignment="right") |
| 45 | + self.add_tour_step("Click here to zoom in.", |
| 46 | + "#widget-zoom-in", alignment="left") |
| 47 | + self.add_tour_step("Or click here to zoom out.", |
| 48 | + "#widget-zoom-out", |
| 49 | + alignment="left", theme="default") |
| 50 | + self.add_tour_step("Use the Menu button to see more options.", |
| 51 | + ".searchbox-hamburger-container", alignment="right") |
| 52 | + self.add_tour_step("Or click here to see more Google apps.", |
| 53 | + '[title="Google apps"]', alignment="left") |
| 54 | + self.add_tour_step("Thanks for trying out SeleniumBase tours!", |
| 55 | + title="End of Guided Tour", theme="square") |
| 56 | + self.play_tour() |
0 commit comments