russell@sidonsoft:~$ _

Quay

_ Chrome DevTools with accessibility-tree semantics

Target elements via accessibility refs instead of fragile CSS selectors. Use your authenticated Chrome sessions. Auto-reconnect built in.

What is Quay?

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.

Features

Accessibility-Based Targeting

Target elements by role, name, state, and relations instead of CSS selectors. Works with dynamic content and survives most UI refactors.

Authenticated Sessions

Use your existing Chrome sessions with cookies, localStorage, and service workers intact. No need to re-authenticate in automated tests.

Auto-Reconnect

Automatic reconnection on disconnect. Long-running tasks and monitoring workflows survive browser updates and network hiccups.

CDP Integration

Direct access to Chrome DevTools Protocol for full control. Perform any action CDP supports — evaluate JS, capture screenshots, intercept network requests.

TypeScript Core

Core library written in TypeScript for type safety and IDE support. Python bindings available for existing test suites.

PyPI Package

Install via pip. Published on PyPI with semantic versioning. Easy to add as a dependency in requirements.txt or pyproject.toml.

Python TypeScript CDP Browser Automation

Installation

bash
pip install quay

Or for development:

bash
git clone https://github.com/sidonsoft/quay
cd quay
pip install -e ".[dev]"

Quick Start

python
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")

CLI Usage

bash
# 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