SeleniumBase/examples/raw_cdp_logging.py

13 lines
317 B
Python
Raw Normal View History

2024-02-23 13:18:46 +08:00
from rich.pretty import pprint
from seleniumbase import Driver
driver = Driver(uc=True, log_cdp=True)
try:
2024-04-26 11:41:43 +08:00
url = "seleniumbase.io/apps/turnstile"
driver.uc_open_with_reconnect(url, 2)
2024-08-03 06:46:50 +08:00
driver.uc_gui_handle_captcha()
2024-02-23 13:18:46 +08:00
driver.sleep(3)
pprint(driver.get_log("performance"))
finally:
driver.quit()