Closed TranTienVan closed 3 months ago
Network log capture must be enabled to take effect (log_cdp=True
):
See the example: SeleniumBase/examples/raw_cdp_logging.py
from rich.pretty import pprint
from seleniumbase import Driver
driver = Driver(uc=True, log_cdp=True)
try:
driver.uc_open_with_reconnect("https://seleniumbase.io/apps/turnstile")
driver.switch_to_frame("iframe")
driver.uc_click("span.mark")
driver.sleep(3)
pprint(driver.get_log("performance"))
finally:
driver.quit()
For more ways to get network logs in SeleniumBase, see: https://stackoverflow.com/a/76557752/7058266
I'm trying to use the
selenium
functiondriver.get_log()
inseleniumbase
, but it doesn't seem to work. Can you help? Thank you!