From 5a8ed7369ef697b5e3cc8f8c92e7a88f60a3e3db Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Mon, 28 Oct 2024 19:57:39 -0400 Subject: [PATCH] Update CDP Mode examples --- examples/cdp_mode/raw_async.py | 5 ++++- examples/cdp_mode/raw_cdp.py | 2 ++ examples/cdp_mode/raw_cdp_with_sb.py | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/cdp_mode/raw_async.py b/examples/cdp_mode/raw_async.py index 6835286498e..74b85a078ab 100644 --- a/examples/cdp_mode/raw_async.py +++ b/examples/cdp_mode/raw_async.py @@ -52,7 +52,10 @@ async def main(): sb.sleep(2.5) sb.remove_elements("msm-cookie-banner") sb.sleep(1.5) - sb.press_keys('input[data-test-id*="search"]', "Amsterdam") + location = "Amsterdam" + sb.press_keys('input[data-test-id*="search"]', location) + sb.sleep(1) + sb.click('input[data-test-id*="search"]') sb.sleep(2) sb.click('span[data-test-id*="autocomplete"]') sb.sleep(5) diff --git a/examples/cdp_mode/raw_cdp.py b/examples/cdp_mode/raw_cdp.py index 54d6b28c01d..990f10fa43e 100644 --- a/examples/cdp_mode/raw_cdp.py +++ b/examples/cdp_mode/raw_cdp.py @@ -24,6 +24,8 @@ def main(): sb.sleep(1.5) location = "Amsterdam" sb.press_keys('input[data-test-id*="search"]', location) + sb.sleep(1) + sb.click('input[data-test-id*="search"]') sb.sleep(2) sb.click('span[data-test-id*="autocomplete"]') sb.sleep(5) diff --git a/examples/cdp_mode/raw_cdp_with_sb.py b/examples/cdp_mode/raw_cdp_with_sb.py index 6b1d74a1f59..6821bbdd1a0 100644 --- a/examples/cdp_mode/raw_cdp_with_sb.py +++ b/examples/cdp_mode/raw_cdp_with_sb.py @@ -14,6 +14,8 @@ sb.sleep(1.5) location = "Amsterdam" sb.press_keys('input[data-test-id*="search"]', location) + sb.sleep(1) + sb.click('input[data-test-id*="search"]') sb.sleep(2) sb.click('span[data-test-id*="autocomplete"]') sb.sleep(5)