Accessibility-Based Targeting
Target elements by role, name, state, and relations instead of CSS selectors. Works with dynamic content and survives most UI refactors.
Quay is a Python library that wraps Chrome DevTools Protocol (CDP) with accessibility-tree semantics. Instead of relying on fragile CSS selectors or XPath expressions, Quay lets you target elements using their accessibility properties — the same way screen readers see the page.
This makes your automation more resilient to UI changes, works with dynamic content, and respects the semantic structure that accessibility APIs provide.
Target elements by role, name, state, and relations instead of CSS selectors. Works with dynamic content and survives most UI refactors.
Use your existing Chrome sessions with cookies, localStorage, and service workers intact. No need to re-authenticate in automated tests.
Automatic reconnection on disconnect. Long-running tasks and monitoring workflows survive browser updates and network hiccups.
Direct access to Chrome DevTools Protocol for full control. Perform any action CDP supports — evaluate JS, capture screenshots, intercept network requests.
Core library written in TypeScript for type safety and IDE support. Python bindings available for existing test suites.
Install via pip. Published on PyPI with semantic versioning. Easy to add as a dependency in requirements.txt or pyproject.toml.
pip install quay
Or for development:
git clone https://github.com/sidonsoft/quay cd quay pip install -e ".[dev]"
import quay
# Connect to authenticated Chrome session
browser = quay.connect()
# Target element by accessibility properties
button = browser.find_by_role("button", name="Submit")
button.click()
# Or use relations
form = browser.find_by_role("form")
inputs = form.find_all_by_role("textbox")
# Connect to Chrome with accessibility tree quay connect --url https://example.com # Find element by role quay find --role button --name "Submit" # Screenshot quay screenshot --output screen.png