Open
Description
Feature and motivation
Implement DevTools/BiDI in Python bindings that don't require using the async/await pattern. The proof-of-concept is implemented in 83112e1.
Usage example
For now, provide lower-level API that can use DevTools/CDP directly. The high-level API will be added later on top of this.
from selenium.webdriver.common.bidi import cdp
devtools = cdp.import_devtools(version)
# execute commands
driver.bidi().execute(devtools.runtime.enable())
# subscribe to events
console_api_calls = []
driver.bidi().on(devtools.runtime.ConsoleAPICalled, lambda e: console_api_calls.append(e))