Skip to content

Commit ef7bdc8

Browse files
committed
Update examples
1 parent 8c0f3ff commit ef7bdc8

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

examples/cdp_mode/raw_cdp_methods.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
sb.gui_drag_and_drop("img#logo", "div#drop2")
1515
sb.nested_click("iframe#myFrame3", ".fBox")
1616
sb.sleep(2)
17+
sb.driver.stop()

examples/cdp_mode/raw_pokemon.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,12 @@
3030
sb.sleep(2)
3131
sb.cdp.highlight_overlay("div.pokemon-ability-info")
3232
sb.sleep(2)
33-
sb.cdp.click('a[href="https://www.pokemon.com/us/play-pokemon/"]')
34-
sb.sleep(0.6)
35-
sb.cdp.click('h3:contains("Find an Event")')
36-
location = "Concord, MA, USA"
37-
sb.cdp.type('input[data-testid="location-search"]', location)
38-
sb.sleep(1.5)
39-
sb.cdp.click("div.autocomplete-dropdown-container div.suggestion-item")
40-
sb.sleep(0.6)
41-
sb.cdp.click('img[alt="search-icon"]')
42-
sb.sleep(2)
43-
events = sb.cdp.select_all('div[data-testid="event-name"]')
44-
print("*** Pokemon events near %s: ***" % location)
33+
sb.cdp.open("https://events.pokemon.com/EventLocator/")
34+
sb.sleep(3)
35+
sb.cdp.click('button span:contains("Premier Events")')
36+
sb.sleep(1)
37+
events = sb.cdp.select_all('div[class="event-info"]')
38+
print("*** Upcoming Premier Events for Pokémon: ***")
4539
for event in events:
4640
print("* " + event.text)
4741
sb.sleep(2)

0 commit comments

Comments
 (0)