Selenium
Selenium can connect to rayobrowse via a CDP shim that bridges ChromeDriver to the daemon’s WebSocket endpoints.
Prerequisites
Section titled “Prerequisites”pip install rayobrowse selenium webdriver-managerExample
Section titled “Example”from rayobrowse import create_browserfrom selenium import webdriverfrom selenium.webdriver.chrome.options import Optionsfrom selenium.webdriver.chrome.service import Servicefrom webdriver_manager.chrome import ChromeDriverManager
ws_url = create_browser(headless=False, target_os="windows")
# The full Selenium example with CDP shim is available at:# https://github.com/rayobyte-data/rayobrowse/blob/main/examples/selenium_example.pyThe complete example includes a cdp_shim context manager that:
- Starts a minimal local HTTP server
- Proxies ChromeDriver’s
/json/versionand/json/listrequests to the daemon - Allows Selenium to connect via
options.debugger_address
See the full example on GitHub.