Skip to content

Commit 1cc80c0

Browse files
committed
Update a Stealthy Playwright example
1 parent 5ebb243 commit 1cc80c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/cdp_mode/playwright/raw_walmart_sync.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
browser = p.chromium.connect_over_cdp(endpoint_url)
1010
page = browser.contexts[0].pages[0]
1111
page.wait_for_timeout(2800)
12+
continue_button = 'button:has-text("Continue shopping")'
13+
if page.locator(continue_button).count() > 0:
14+
page.click(continue_button)
1215
page.click('input[aria-label="Search"]')
1316
page.wait_for_timeout(1800)
1417
search = "Settlers of Catan Board Game"
@@ -28,6 +31,9 @@
2831
page.wait_for_timeout(1200)
2932
page.wait_for_selector('[data-item-id]', timeout=10000)
3033
page.wait_for_timeout(600)
34+
for i in range(17):
35+
sb.scroll_down(16)
36+
sb.sleep(0.05)
3137
items = page.locator('[data-item-id]')
3238
for i in range(items.count()):
3339
item = items.nth(i)

0 commit comments

Comments
 (0)