Automated Testing
rayobrowse can be used for end-to-end testing where you need a browser that behaves like a real user’s device, rather than a detectable automation tool.
Use cases
Section titled “Use cases”- Testing sites that behave differently for automated browsers
- Verifying that your own bot detection works correctly
- Running tests through proxies with geographic fingerprint matching
- Visual testing with realistic screen resolutions and fonts
Example
Section titled “Example”from playwright.sync_api import sync_playwright
with sync_playwright() as p: browser = p.chromium.connect_over_cdp( "ws://localhost:9222/connect?headless=true&os=windows" ) page = browser.new_context().new_page() page.goto("https://your-app.com")
assert page.title() == "Expected Title" assert page.locator("#login-button").is_visible()
browser.close()