diff --git a/README.md b/README.md index 0cb7d5b3e99..e7a3bdb1870 100755 --- a/README.md +++ b/README.md @@ -118,8 +118,8 @@ with SB(uc=True, test=True, locale="en") as sb: from seleniumbase import sb_cdp url = "https://gitlab.com/users/sign_in" -sb = sb_cdp.Chrome(url) -sb.sleep(2.5) +sb = sb_cdp.Chrome(url, incognito=True) +sb.sleep(2) sb.solve_captcha() sb.highlight('h1:contains("GitLab")') sb.highlight('button:contains("Sign in")') diff --git a/examples/cdp_mode/ReadMe.md b/examples/cdp_mode/ReadMe.md index 6881180c77b..323c6ceda45 100644 --- a/examples/cdp_mode/ReadMe.md +++ b/examples/cdp_mode/ReadMe.md @@ -140,7 +140,7 @@ from seleniumbase import SB with SB(uc=True, test=True, locale="en", ad_block=True) as sb: url = "https://www.pokemon.com/us" sb.activate_cdp_mode(url) - sb.sleep(3.2) + sb.sleep(3.5) sb.click_if_visible("button#onetrust-accept-btn-handler") sb.sleep(1.2) sb.click("a span.icon_pokeball") @@ -148,9 +148,9 @@ with SB(uc=True, test=True, locale="en", ad_block=True) as sb: sb.click('b:contains("Show Advanced Search")') sb.sleep(2.5) sb.click('span[data-type="type"][data-value="electric"]') - sb.sleep(0.5) + sb.sleep(0.7) sb.scroll_into_view("a#advSearch") - sb.sleep(0.5) + sb.sleep(0.7) sb.click("a#advSearch") sb.sleep(1.2) sb.click('img[src*="img/pokedex/detail/025.png"]') @@ -234,10 +234,10 @@ with SB(uc=True, test=True, locale="en") as sb: ```python from seleniumbase import SB -with SB(uc=True, test=True, locale="en", ad_block=True) as sb: +with SB(uc=True, test=True, locale="en", guest=True) as sb: url = "https://www.bestwestern.com/en_US.html" sb.activate_cdp_mode(url) - sb.sleep(2.5) + sb.sleep(3) sb.click_if_visible(".onetrust-close-btn-handler") sb.sleep(1) sb.click("input#destination-input") diff --git a/examples/cdp_mode/raw_ahrefs.py b/examples/cdp_mode/raw_ahrefs.py index c3e1f4b5cbb..d722e7aaece 100644 --- a/examples/cdp_mode/raw_ahrefs.py +++ b/examples/cdp_mode/raw_ahrefs.py @@ -8,7 +8,7 @@ sb.type(input_field, "github.com/seleniumbase/SeleniumBase") sb.scroll_down(36) sb.click(submit_button) - sb.sleep(1) + sb.sleep(2) sb.solve_captcha() sb.sleep(3) sb.wait_for_text_not_visible("Checking", timeout=15) diff --git a/examples/cdp_mode/raw_bestwestern.py b/examples/cdp_mode/raw_bestwestern.py index a695fca66e2..9c0c58dac4c 100644 --- a/examples/cdp_mode/raw_bestwestern.py +++ b/examples/cdp_mode/raw_bestwestern.py @@ -1,9 +1,9 @@ from seleniumbase import SB -with SB(uc=True, test=True, locale="en", ad_block=True) as sb: +with SB(uc=True, test=True, locale="en", guest=True) as sb: url = "https://www.bestwestern.com/en_US.html" sb.activate_cdp_mode(url) - sb.sleep(2.5) + sb.sleep(3) sb.click_if_visible(".onetrust-close-btn-handler") sb.sleep(1) sb.click("input#destination-input") diff --git a/examples/cdp_mode/raw_cdp_copilot.py b/examples/cdp_mode/raw_cdp_copilot.py index df2740dc468..03885363ac6 100644 --- a/examples/cdp_mode/raw_cdp_copilot.py +++ b/examples/cdp_mode/raw_cdp_copilot.py @@ -1,7 +1,7 @@ from seleniumbase import sb_cdp url = "https://copilot.microsoft.com/" -sb = sb_cdp.Chrome(url, locale="en") +sb = sb_cdp.Chrome(url, locale="en", guest=True) textarea = "textarea#userInput" sb.wait_for_element(textarea) sb.sleep(1.5) diff --git a/examples/cdp_mode/raw_cdp_gitlab.py b/examples/cdp_mode/raw_cdp_gitlab.py index da3da24c465..d285fe253b3 100644 --- a/examples/cdp_mode/raw_cdp_gitlab.py +++ b/examples/cdp_mode/raw_cdp_gitlab.py @@ -2,6 +2,7 @@ url = "https://gitlab.com/users/sign_in" sb = sb_cdp.Chrome(url, incognito=True) +sb.sleep(2) sb.solve_captcha() sb.highlight('h1:contains("GitLab")') sb.highlight('button:contains("Sign in")') diff --git a/examples/cdp_mode/raw_cf.py b/examples/cdp_mode/raw_cf.py index 1d91373dc25..5be45bbdbd3 100644 --- a/examples/cdp_mode/raw_cf.py +++ b/examples/cdp_mode/raw_cf.py @@ -4,13 +4,13 @@ with SB(uc=True, test=True, locale="en", guest=True) as sb: url = "https://www.cloudflare.com/login" sb.activate_cdp_mode(url) - sb.sleep(3) + sb.sleep(4) sb.uc_gui_handle_captcha() # PyAutoGUI press Tab and Spacebar sb.sleep(2) with SB(uc=True, test=True, locale="en", guest=True) as sb: url = "https://www.cloudflare.com/login" sb.activate_cdp_mode(url) - sb.sleep(3) + sb.sleep(4) sb.uc_gui_click_captcha() # PyAutoGUI click. (Linux needs it) sb.sleep(2) diff --git a/examples/cdp_mode/raw_gitlab.py b/examples/cdp_mode/raw_gitlab.py index 95e0bef1277..0d9b6a1018d 100644 --- a/examples/cdp_mode/raw_gitlab.py +++ b/examples/cdp_mode/raw_gitlab.py @@ -3,6 +3,7 @@ with SB(uc=True, test=True, locale="en") as sb: url = "https://gitlab.com/users/sign_in" sb.activate_cdp_mode(url) + sb.sleep(2) sb.solve_captcha() # (The rest is for testing and demo purposes) sb.assert_text("Username", '[for="user_login"]', timeout=3) diff --git a/examples/cdp_mode/raw_glassdoor.py b/examples/cdp_mode/raw_glassdoor.py index 7e586e97089..f7caac8cb57 100644 --- a/examples/cdp_mode/raw_glassdoor.py +++ b/examples/cdp_mode/raw_glassdoor.py @@ -3,7 +3,7 @@ with SB(uc=True, test=True, ad_block=True) as sb: url = "https://www.glassdoor.com/Reviews/index.htm" sb.activate_cdp_mode(url) - sb.sleep(1.2) + sb.sleep(1.5) sb.solve_captcha() sb.highlight('[data-test="global-nav-glassdoor-logo"]') sb.highlight('[data-test="site-header-companies"]') diff --git a/examples/cdp_mode/raw_kohls.py b/examples/cdp_mode/raw_kohls.py index e53d68a2936..c809412b13e 100644 --- a/examples/cdp_mode/raw_kohls.py +++ b/examples/cdp_mode/raw_kohls.py @@ -1,12 +1,15 @@ from seleniumbase import SB -with SB(uc=True, test=True, locale="en", ad_block=True) as sb: +with SB(uc=True, test=True, locale="en", incognito=True) as sb: url = "https://www.kohls.com/" sb.activate_cdp_mode(url) sb.sleep(2.6) search = "Mickey Mouse Blanket" req_1 = "Mickey" req_2 = "Blanket" + if not sb.is_element_present('input[name="search"]'): + sb.refresh() + sb.sleep(2.6) sb.press_keys('input[name="search"]', search + "\n") sb.sleep(5) item_selector = 'div[data-testid*="wallet-wrapper"]' diff --git a/examples/cdp_mode/raw_planetmc.py b/examples/cdp_mode/raw_planetmc.py index 36949ceaef2..0e00de1c645 100644 --- a/examples/cdp_mode/raw_planetmc.py +++ b/examples/cdp_mode/raw_planetmc.py @@ -3,7 +3,7 @@ with SB(uc=True, test=True, guest=True) as sb: url = "www.planetminecraft.com/account/sign_in/" sb.activate_cdp_mode(url) - sb.sleep(1.2) + sb.sleep(2.5) sb.solve_captcha() sb.wait_for_element_absent("input[disabled]") sb.sleep(2) diff --git a/examples/cdp_mode/raw_pokemon.py b/examples/cdp_mode/raw_pokemon.py index 8e8d820e531..d5d0163c986 100644 --- a/examples/cdp_mode/raw_pokemon.py +++ b/examples/cdp_mode/raw_pokemon.py @@ -1,9 +1,9 @@ from seleniumbase import SB -with SB(uc=True, test=True, locale="en", ad_block=True) as sb: +with SB(uc=True, test=True, locale="en", guest=True) as sb: url = "https://www.pokemon.com/us" sb.activate_cdp_mode(url) - sb.sleep(3.2) + sb.sleep(3.5) sb.click_if_visible("button#onetrust-accept-btn-handler") sb.sleep(1.2) sb.click("a span.icon_pokeball") @@ -11,9 +11,9 @@ sb.click('b:contains("Show Advanced Search")') sb.sleep(2.5) sb.click('span[data-type="type"][data-value="electric"]') - sb.sleep(0.5) + sb.sleep(0.7) sb.scroll_into_view("a#advSearch") - sb.sleep(0.5) + sb.sleep(0.7) sb.click("a#advSearch") sb.sleep(1.2) sb.click('img[src*="img/pokedex/detail/025.png"]') diff --git a/examples/cdp_mode/raw_seatgeek.py b/examples/cdp_mode/raw_seatgeek.py index be2ad34ce6c..892d988c78f 100644 --- a/examples/cdp_mode/raw_seatgeek.py +++ b/examples/cdp_mode/raw_seatgeek.py @@ -1,6 +1,6 @@ from seleniumbase import SB -with SB(uc=True, test=True, guest=True) as sb: +with SB(uc=True, test=True, ad_block=True) as sb: url = "https://seatgeek.com/" sb.activate_cdp_mode(url) input_field = 'input[name="search"]' diff --git a/examples/cdp_mode/raw_wsform.py b/examples/cdp_mode/raw_wsform.py index 5ee9647f2a5..aee5bbb1567 100644 --- a/examples/cdp_mode/raw_wsform.py +++ b/examples/cdp_mode/raw_wsform.py @@ -3,7 +3,7 @@ with SB(uc=True, test=True, locale="en", incognito=True) as sb: url = "https://wsform.com/demo/" sb.activate_cdp_mode(url) - sb.sleep(1) + sb.sleep(2) sb.scroll_into_view("div.grid") sb.uc_gui_click_captcha() sb.sleep(2) diff --git a/examples/presenter/uc_presentation_4.py b/examples/presenter/uc_presentation_4.py index 58049a43532..8b2103301f7 100644 --- a/examples/presenter/uc_presentation_4.py +++ b/examples/presenter/uc_presentation_4.py @@ -463,16 +463,18 @@ def test_presentation_4(self): with SB(uc=True, test=True, locale="en", ad_block=True) as sb: url = "https://www.pokemon.com/us" sb.activate_cdp_mode(url) - sb.sleep(3.2) - sb.cdp.click("button#onetrust-accept-btn-handler") + sb.sleep(3.5) + sb.click_if_visible("button#onetrust-accept-btn-handler") sb.sleep(1.2) - sb.cdp.click("a span.icon_pokeball") + sb.click("a span.icon_pokeball") sb.sleep(2.5) - sb.cdp.click('b:contains("Show Advanced Search")') + sb.click('b:contains("Show Advanced Search")') sb.sleep(2.5) - sb.cdp.click('span[data-type="type"][data-value="electric"]') - sb.sleep(0.5) + sb.click('span[data-type="type"][data-value="electric"]') + sb.sleep(0.7) sb.scroll_into_view("a#advSearch") + sb.sleep(0.7) + sb.click("a#advSearch") sb.sleep(0.5) sb.cdp.click("a#advSearch") sb.sleep(1.2) @@ -720,10 +722,10 @@ def test_presentation_4(self): ) self.begin_presentation(filename="uc_presentation.html") - with SB(uc=True, test=True, locale="en", ad_block=True) as sb: + with SB(uc=True, test=True, locale="en", guest=True) as sb: url = "https://www.bestwestern.com/en_US.html" sb.activate_cdp_mode(url) - sb.sleep(2.5) + sb.sleep(3) sb.click_if_visible(".onetrust-close-btn-handler") sb.sleep(1) sb.click("input#destination-input") diff --git a/examples/raw_cf.py b/examples/raw_cf.py index 7d6cd617f35..cc893e7522f 100644 --- a/examples/raw_cf.py +++ b/examples/raw_cf.py @@ -1,9 +1,9 @@ """SB Manager using CDP Mode for bypassing CAPTCHAs.""" from seleniumbase import SB -with SB(uc=True, test=True, locale="en") as sb: +with SB(uc=True, test=True, locale="en", guest=True) as sb: url = "https://www.cloudflare.com/login" sb.activate_cdp_mode(url) - sb.sleep(3.5) + sb.sleep(4) sb.solve_captcha() sb.sleep(2.5) diff --git a/examples/raw_games.py b/examples/raw_games.py index 47f5fa8cbc9..8ea5757e94c 100644 --- a/examples/raw_games.py +++ b/examples/raw_games.py @@ -1,7 +1,7 @@ """SB Manager using CDP Mode for evading bot-detection.""" from seleniumbase import SB -with SB(uc=True, test=True) as sb: +with SB(uc=True, test=True, disable_csp=True) as sb: url = "https://steamdb.info/" sb.activate_cdp_mode(url) sb.sleep(1) @@ -9,6 +9,10 @@ sb.sleep(2) sb.solve_captcha() sb.assert_text("Sign in", "button#js-sign-in", timeout=4) + sb.sleep(0.5) sb.click("button#js-sign-in") + sb.sleep(0.5) sb.highlight("div.page_content form") sb.highlight('button:contains("Sign in")', scroll=False) + sb.set_messenger_theme(location="top_center") + sb.post_message("SeleniumBase wasn't detected", duration=4) diff --git a/examples/raw_gitlab.py b/examples/raw_gitlab.py index 033399f43d6..f2ed1121d13 100644 --- a/examples/raw_gitlab.py +++ b/examples/raw_gitlab.py @@ -1,6 +1,6 @@ from seleniumbase import SB -with SB(uc=True, test=True) as sb: +with SB(uc=True, test=True, locale="en") as sb: url = "https://gitlab.com/users/sign_in" sb.activate_cdp_mode(url) sb.sleep(2) diff --git a/examples/raw_order_tickets.py b/examples/raw_order_tickets.py index 082285e9d73..2e7fd568a57 100644 --- a/examples/raw_order_tickets.py +++ b/examples/raw_order_tickets.py @@ -1,6 +1,6 @@ from seleniumbase import SB -with SB(uc=True, test=True, guest=True) as sb: +with SB(uc=True, test=True, ad_block=True) as sb: url = "https://www.ticketmaster.com" sb.activate_cdp_mode(url) input_field = 'input[name="q"]' diff --git a/examples/test_scrape_bing.py b/examples/test_scrape_bing.py index 9fd1dbfdd29..da610a0cac1 100644 --- a/examples/test_scrape_bing.py +++ b/examples/test_scrape_bing.py @@ -9,6 +9,7 @@ def test_scrape_bing(self): self.skip("Skipping test in multi-threaded mode.") self.open("www.bing.com/search?q=SeleniumBase+GitHub&qs=n&form=QBRE") self.wait_for_element("main h2 a") + self.sleep(0.5) soup = self.get_beautiful_soup() titles = [item.text for item in soup.select("main h2 a")] print("\nSearch Result Headers:") diff --git a/mkdocs_build/requirements.txt b/mkdocs_build/requirements.txt index 5b19ca90f5e..75be3bc1a4b 100644 --- a/mkdocs_build/requirements.txt +++ b/mkdocs_build/requirements.txt @@ -6,7 +6,7 @@ pymdown-extensions>=10.17.1 pipdeptree>=2.30.0 python-dateutil>=2.8.2 Markdown==3.10 -click==8.3.0 +click==8.3.1 ghp-import==2.1.0 watchdog==6.0.0 cairocffi==1.7.1 diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index dde5e0c262d..d611ab00e0b 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.44.12" +__version__ = "4.44.13" diff --git a/seleniumbase/core/browser_launcher.py b/seleniumbase/core/browser_launcher.py index b0445a664c4..978f21fe45d 100644 --- a/seleniumbase/core/browser_launcher.py +++ b/seleniumbase/core/browser_launcher.py @@ -470,6 +470,12 @@ def uc_execute_cdp_cmd(driver, *args, **kwargs): return driver.default_execute_cdp_cmd(*args, **kwargs) +def updated_get(driver, url): + if url and ":" not in url and "." in url: + url = "https:" + url + driver.default_get(url) + + def uc_special_open_if_cf( driver, url, @@ -479,6 +485,8 @@ def uc_special_open_if_cf( device_height=None, device_pixel_ratio=None, ): + if url and ":" not in url and "." in url: + url = "https:" + url if url.startswith("http:") or url.startswith("https:"): special = False with suppress(Exception): @@ -5938,6 +5946,8 @@ def get_local_driver( 'Emulation.setDeviceMetricsOverride', set_device_metrics_override ) + else: + driver.get = lambda url: updated_get(driver, url) return extend_driver( driver, proxy_auth, use_uc, recorder_ext ) diff --git a/seleniumbase/core/detect_b_ver.py b/seleniumbase/core/detect_b_ver.py index 129331fcee7..8a97a7b8db2 100644 --- a/seleniumbase/core/detect_b_ver.py +++ b/seleniumbase/core/detect_b_ver.py @@ -360,19 +360,19 @@ def comet_on_windows_path(browser_type=None): for item in map( os.environ.get, ( + "LOCALAPPDATA", "PROGRAMFILES", "PROGRAMFILES(X86)", - "LOCALAPPDATA", "PROGRAMW6432", ), ): for subitem in ( - "Perplexity/Comet/Application" + "Perplexity/Comet/Application", "Comet/Application", "Programs/Comet", ): try: - candidates.append(os.sep.join((item, subitem, "Comet.exe"))) + candidates.append(os.sep.join((item, subitem, "comet.exe"))) except TypeError: pass for candidate in candidates: @@ -390,19 +390,19 @@ def atlas_on_windows_path(browser_type=None): for item in map( os.environ.get, ( + "LOCALAPPDATA", "PROGRAMFILES", "PROGRAMFILES(X86)", - "LOCALAPPDATA", "PROGRAMW6432", ), ): for subitem in ( - "OpenAI/Atlas/Application" + "OpenAI/Atlas/Application", "Atlas/Application", "Programs/Atlas", ): try: - candidates.append(os.sep.join((item, subitem, "Atlas.exe"))) + candidates.append(os.sep.join((item, subitem, "atlas.exe"))) except TypeError: pass for candidate in candidates: diff --git a/seleniumbase/fixtures/js_utils.py b/seleniumbase/fixtures/js_utils.py index f37e3ce2e5d..aa11c40a2c3 100644 --- a/seleniumbase/fixtures/js_utils.py +++ b/seleniumbase/fixtures/js_utils.py @@ -914,15 +914,16 @@ def set_messenger_theme( % (max_messages, messenger_location, theme) ) try: + time.sleep(0.015) execute_script(driver, msg_style) except Exception: - time.sleep(0.03) + time.sleep(0.035) activate_messenger(driver) - time.sleep(0.15) + time.sleep(0.175) with suppress(Exception): execute_script(driver, msg_style) - time.sleep(0.02) - time.sleep(0.05) + time.sleep(0.035) + time.sleep(0.055) def post_message(driver, message, msg_dur=None, style="info"): diff --git a/seleniumbase/plugins/base_plugin.py b/seleniumbase/plugins/base_plugin.py index 7ceb7568d42..0a1bd5b2251 100644 --- a/seleniumbase/plugins/base_plugin.py +++ b/seleniumbase/plugins/base_plugin.py @@ -240,14 +240,22 @@ def beforeTest(self, test): test.test.test_id = test.id() test.test.is_nosetest = True test.test.environment = self.options.environment + sb_config.environment = self.options.environment test.test.env = self.options.environment # Add a shortened version test.test.account = self.options.account + sb_config.account = self.options.account test.test.data = self.options.data + sb_config.data = self.options.data test.test.var1 = self.options.var1 + sb_config.var1 = self.options.var1 test.test.var2 = self.options.var2 + sb_config.var2 = self.options.var2 test.test.var3 = self.options.var3 + sb_config.var3 = self.options.var3 test.test.variables = variables # Already verified is a dictionary + sb_config.variables = variables test.test.settings_file = self.options.settings_file + sb_config.settings_file = self.options.settings_file test.test._final_debug = self.options.final_debug test.test.log_path = self.options.log_path if self.options.archive_downloads: diff --git a/seleniumbase/undetected/cdp_driver/browser.py b/seleniumbase/undetected/cdp_driver/browser.py index 4ee2c26e35c..d81660a09d7 100644 --- a/seleniumbase/undetected/cdp_driver/browser.py +++ b/seleniumbase/undetected/cdp_driver/browser.py @@ -321,6 +321,7 @@ async def get( _cdp_user_agent = "" _cdp_locale = None _cdp_platform = None + _cdp_disable_csp = None _cdp_geolocation = None _cdp_recorder = None _cdp_ad_block = None @@ -365,13 +366,19 @@ async def get( _cdp_platform = kwargs["platform"] elif "plat" in kwargs: _cdp_platform = kwargs["plat"] + if "disable_csp" in kwargs: + _cdp_disable_csp = kwargs["disable_csp"] + elif hasattr(sb_config, "disable_csp"): + _cdp_disable_csp = sb_config.disable_csp if "geolocation" in kwargs: _cdp_geolocation = kwargs["geolocation"] elif "geoloc" in kwargs: _cdp_geolocation = kwargs["geoloc"] if "recorder" in kwargs: _cdp_recorder = kwargs["recorder"] + await connection.sleep(0.01) await connection.send(cdp.network.enable()) + await connection.sleep(0.01) if _cdp_timezone: await connection.set_timezone(_cdp_timezone) if _cdp_locale: @@ -420,6 +427,8 @@ async def get( )) if _cdp_geolocation: await connection.set_geolocation(_cdp_geolocation) + if _cdp_disable_csp: + await connection.send(cdp.page.set_bypass_csp(enabled=True)) # (The code below is for the Chrome 142 extension fix) if ( hasattr(sb_config, "_cdp_proxy") diff --git a/seleniumbase/undetected/cdp_driver/cdp_util.py b/seleniumbase/undetected/cdp_driver/cdp_util.py index 48bf6f2efbf..b7acafc19d6 100644 --- a/seleniumbase/undetected/cdp_driver/cdp_util.py +++ b/seleniumbase/undetected/cdp_driver/cdp_util.py @@ -281,6 +281,7 @@ async def start( proxy: Optional[str] = None, # "host:port" or "user:pass@host:port" tzone: Optional[str] = None, # Eg "America/New_York", "Asia/Kolkata" geoloc: Optional[list | tuple] = None, # Eg (48.87645, 2.26340) + disable_csp: Optional[str] = None, # Disable content security policy extension_dir: Optional[str] = None, # Chrome extension directory **kwargs: Optional[dict], ) -> Browser: @@ -357,6 +358,11 @@ async def start( ad_block = True else: ad_block = False + if disable_csp is None: + if "--disable-csp" in sys_argv or "--disable_csp" in sys_argv: + disable_csp = True + else: + disable_csp = False if xvfb_metrics is None and "--xvfb-metrics" in arg_join: x_m = xvfb_metrics count = 0 @@ -556,6 +562,8 @@ async def start( ad_block_dir = os.path.join(DOWNLOADS_FOLDER, "ad_block") __unzip_to_new_folder(ad_block_zip, ad_block_dir) extension_dir = __add_chrome_ext_dir(extension_dir, ad_block_dir) + if disable_csp: + sb_config.disable_csp = True if "binary_location" in kwargs and not browser_executable_path: browser_executable_path = kwargs["binary_location"] if not browser_executable_path: diff --git a/seleniumbase/undetected/cdp_driver/tab.py b/seleniumbase/undetected/cdp_driver/tab.py index 948053baea5..d53ac36ee55 100644 --- a/seleniumbase/undetected/cdp_driver/tab.py +++ b/seleniumbase/undetected/cdp_driver/tab.py @@ -1064,7 +1064,7 @@ async def wait_for( raise asyncio.TimeoutError( "Time ran out while waiting for: {%s}" % selector ) - await self.sleep(0.5) + await self.sleep(0.068) return item if text: item = await self.find_element_by_text(text) @@ -1074,7 +1074,7 @@ async def wait_for( raise asyncio.TimeoutError( "Time ran out while waiting for: {%s}" % text ) - await self.sleep(0.5) + await self.sleep(0.068) return item async def download_file(