Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🚀 Feature]: Synchronous DevTools/BiDi in Python #13975

Open
p0deje opened this issue May 18, 2024 · 0 comments
Open

[🚀 Feature]: Synchronous DevTools/BiDi in Python #13975

p0deje opened this issue May 18, 2024 · 0 comments
Labels
C-devtools BiDi or Chrome DevTools related issues C-py I-enhancement

Comments

@p0deje
Copy link
Member

p0deje commented May 18, 2024

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))
@pujagani pujagani added the C-devtools BiDi or Chrome DevTools related issues label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-devtools BiDi or Chrome DevTools related issues C-py I-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants