Skip to main content

Helixwright

Helixwright is the Python automation SDK for Helix Browser.

Version 0.4.0 is a breaking V5-only public facade. It does not use CDP, WebDriver, Playwright, Selenium, direct chrome.exe launch, local profile folders, or local fingerprint generation.

Runtime Model

Helixwright talks to Helix Browser Desktop Local API. The desktop app creates or reuses a server-owned profile, starts an automation session, and returns a private Browser RPC endpoint. Page automation then uses Browser RPC V5.

Runtime rules:

  • /rpc is used only for rpc.hello discovery.
  • Normal runtime control must switch to /rpc/v5.
  • Older RPC V1/V2/V3/V4 cores are rejected.
  • Locator is the canonical element-action layer.
  • Input is raw trusted input only.
  • Browser profiles, fingerprints, geo-follow, proxy materialization, and cloud sync are owned by Helix Browser, not by the SDK.

Install

pip install helixwright

Local source development:

cd "G:\Helix Browser\repos\helixwright"
pip install -e .
python tests\ci.py

Quick Start

import helixwright as hw

with hw.launch("https://example.com", name="demo") as page:
    page.wait_for("body")
    print(page.title())
    page.locator("body").click()

Most scripts only need a URL and, when required, a proxy:

with hw.launch(
    "https://example.com",
    proxy="http://user:pass@127.0.0.1:7890",
) as page:
    print(page.profile_id, page.session_id)

Reuse an existing Helix profile only when you already know that profile should be used:

with hw.launch("https://example.com", reuse_profile_id="p_existing") as page:
    print(page.url)

Public Objects

Object Purpose
Client Local API client and profile/browser/core managers.
Page Primary automation session returned by hw.launch().
Locator Element lookup and element-bound actions.
Input Raw trusted mouse, keyboard, wheel, drag, and pointer path input.
MotionProfile Python-visible motion policy passed to Browser RPC V5.
TraceController Lightweight native trace control through page.trace.
TraceRecorder AI/debug evidence directory writer.
ProbeController Page inspection helpers through page.probe.
TabController page.tabs multi-tab helpers.
NetworkController page.network capture, waits, response body, and routing helpers.
DownloadController page.downloads download capture and wait helpers.
DialogController page.dialogs JavaScript alert/confirm/prompt policy.
CookieController page.cookies browser cookie and storage-state helpers.
ConsoleController page.console console capture polling.

Retired pre-V5 public element objects, Fingerprint, account lookup launch, direct browser launch, and old RPC fallback surfaces are intentionally absent.

Launch API

hw.launch(
    url=None,
    *,
    reuse_profile_id=None,
    name=None,
    group=None,
    tags=None,
    start_pages=None,
    proxy=None,
    client=None,
    base_url=None,
    headless=False,
    timeout_ms=30000,
    humanize=None,
    motion=None,
) -> Page

Reusable config:

cfg = hw.LaunchConfig(
    name="shop",
    url="https://example.com",
    proxy="http://127.0.0.1:7890",
    motion=hw.MotionProfile.balanced(),
)

with hw.launch(config=cfg) as page:
    page.locator("body").wait()

Unsupported old arguments raise TypeError, including account_id, profile_id, fingerprint, chrome, user_data_dir, persona, seed, and extra_args.

Page

Page is the main object returned by hw.launch(). It owns state, navigation, controllers, trace, probes, and short one-off element shortcuts.

API Returns Notes
page.url str Current URL.
page.title() str Current document title.
page.content() str Current document HTML.
page.goto(url, wait="load", timeout_ms=None) Page Navigate and return the same page.
page.back(timeout_ms=30000) Page Browser history back.
page.forward(timeout_ms=30000) Page Browser history forward.
page.reload(ignore_cache=False, timeout_ms=30000) Page Reload current page.
page.wait_for_url(url_or_predicate, timeout_ms=30000) str Returns matched URL.
page.screenshot(path=None) bytes Writes PNG when path is given.
page.evaluate(expression) Any Evaluate a JavaScript expression in Helixwright's isolated world. Use for diagnostics and DOM readbacks, not page main-world globals.
page.scroll_until(selector, max_rounds=40, step=None, container=None, into_view=True, timeout_ms=30000) Locator Trusted-wheel discovery for lazy or virtualized targets.
page.frames() list[dict] Document frame/OOPIF inventory.
page.targets() list[dict] Browser tab/WebContents inventory.
page.last_action_receipt() dict Last Browser RPC action receipt.
page.info() dict Session/profile/fingerprint/proxy snapshot.
page.close() None Close the automation session.

One-off shortcuts delegate to Locator:

page.click("role=button@@name:Sign in")
page.fill("label=Email", "user@example.com")
page.type("label=Password", "secret")
page.press("label=Password", "Enter")

Prefer Locator variables for anything reused or important.

page.evaluate() runs in Helixwright's isolated automation world. It can read DOM state such as document.title, attributes, element values, and arrays built from DOM queries. It intentionally does not run in the page main world, so globals created by site scripts, such as window.someFlag, are not a reliable production success signal. Use DOM state, Locator reads, page.probe, action receipts, or explicit visible destination elements instead.

Locators

Use page.locator(selector) for CSS and Helix structured selectors:

email = page.locator("label=Email")
email.fill("user@example.com")
print(email.input_value())

page.locator("role=button@@name:Sign in").click()

Structured selector factories are available when you want typed code instead of string formatting:

page.get_by_role("button", name="Sign in").click()
page.get_by_text("Continue").click()
page.get_by_label("Email").fill("user@example.com")
page.get_by_placeholder("Search").type("invoice")
page.get_by_test_id("submit").click()

row = page.locator("tr[data-user='42']")
row.get_by_role("button", name="Edit").click()

Frame-flat selectors supported by the current core include:

  • Plain CSS.
  • Interactive text=... / text:"...".
  • role=button@@name:... and other role+name selectors.
  • label=....
  • placeholder=..., aria-label=..., aria=..., title=..., alt=....
  • testid=..., matching data-testid, data-test, data-qa, and data-cy.
  • Simple positive Drission text filters when they compile to one CSS scope plus one text filter.

targets() is not a frame list. Use frames() when diagnosing iframe or OOPIF visibility.

Inside with page.frame(target) as frame:, locators stay scoped to that frame for consecutive actions. frame.locator(...).click() uses the same V5 trusted action and bounded scroll discovery path, but it does not reset the explicit frame scope after the first action.

Locator Actions

Default actions are trusted Browser RPC V5 actions. Eligible root-page locators use the frame-flat element path, so clicks can auto-scroll the correct root, iframe/OOPIF, or scroll container target before clicking. Locator.click(), Locator.fill(), and Locator.type() first handle existing offscreen targets through the core's precise scroll target; if the target is not yet materialized, they perform bounded trusted-wheel discovery across visible scroll surfaces and frames before failing with scroll-attempt evidence. Use page.scroll_until(...) when a script intentionally scopes discovery to a known virtualized list or custom scroll container.

API Returns Notes
locator.click(timeout_ms=None, verify=None) Locator Trusted click.
locator.double_click(timeout_ms=None) Locator Trusted double click.
locator.hover(timeout_ms=None) Locator Trusted hover.
locator.fill(text, timeout_ms=None, verify=True) Locator Clear and set form value; verifies by default.
locator.type(text, timeout_ms=None, verify=True) Locator Trusted key input; verifies by default.
locator.press(key, timeout_ms=None) Locator Focus target and press key.
locator.select(value=None, label=None, index=None, timeout_ms=None) list[str] Select exactly one axis.
locator.drag_to(target, timeout_ms=None) Locator Drag to another Locator.
locator.upload(files, verify=True, timeout_ms=None) Locator Attach file path(s) to file input.
locator.wait(state="visible", timeout_ms=None) Locator Wait for state.
locator.scroll_into_view(timeout_ms=None) Locator Explicit scroll helper.
locator.resolve(timeout_ms=None) dict V5 resolve evidence.
locator.explain(timeout_ms=None) dict Actionability and hit-test evidence.
locator.input_value(timeout_ms=None) Any Form value readback.
locator.text() str Element text.
locator.attr(name) Any Attribute value.
locator.rect() Any Bounding box.
locator.screenshot(path=None, timeout_ms=None) bytes Element PNG.

Native HTML <select> uses Browser RPC V5 element.select_native when the core advertises it. The native option popup is browser UI, not a DOM locator.

Raw Input

Use page.input only when you intentionally need raw coordinates or a custom trajectory. Normal element work belongs on Locator.

page.input.click(100, 200)
page.input.wheel(600)
page.input.key("Enter")
page.input.type("already focused target")

page.input.pointer_path([
    {"x": 10, "y": 20, "dt": 0, "kind": "move"},
    {"x": 12, "y": 22, "dt": 16, "kind": "down", "buttons": 1},
    {"x": 40, "y": 55, "dt": 80, "kind": "up", "buttons": 0},
])

pointer_path(points) is one atomic Browser RPC V5 call. It is not emulated by many SDK round trips.

MotionProfile

humanize controls action-to-action timing. MotionProfile controls the compact Python-visible motion policy passed to Browser RPC V5.

motion = hw.MotionProfile.fast()

with hw.launch("https://example.com", motion=motion, humanize="default") as page:
    page.get_by_role("button", name="Submit").click()

Motion policy applies to:

  • Locator.click() and other Browser RPC V5 element actions when the core uses SDK motion policy.
  • page.input.move(), page.input.click(), page.input.drag(), and page.scroll().
  • Page.set_motion(...), which changes the active page default.

page.input.pointer_path(points) is the exception: it is fully caller-defined raw trajectory input.

Page Controllers

Domain controllers keep non-element capabilities grouped instead of adding many unrelated top-level Page methods.

Tabs

print(page.tabs.list())          # -> list[dict]
index = page.tabs.new("https://example.com")
page.tabs.switch(index)
page.tabs.close(index)

popup = page.tabs.expect(
    lambda: page.get_by_role("link", name="Open").click(),
    timeout_ms=30000,
)                                  # -> dict

Network

page.network.listen()
page.get_by_role("button", name="Load").click()

response = page.network.wait_for_response("/api/items", timeout_ms=30000)
print(response.status, response.url)

with page.network.expect_response("/api/save", timeout_ms=30000) as response_info:
    page.get_by_role("button", name="Save").click()
print(response_info.value.json())

page.network.block("*.png", "*.gif")
page.network.clear_routes()

Body helpers read captured response assets:

text = page.network.body("https://example.com/api/items")
raw = page.network.bytes("https://example.com/file.bin")
headers = page.network.headers("https://example.com/api/items")
data = page.network.json("https://example.com/api/items")

Downloads

download = page.downloads.expect(
    lambda: page.get_by_role("link", name="Export").click(),
    timeout_ms=30000,
)                                  # -> dict
print(download["path"])

Dialogs

page.dialogs.accept()
page.dialogs.dismiss()
page.dialogs.accept(prompt_text="hello")
page.dialogs.off()

Cookies And Storage

cookies = page.cookies.list()
page.cookies.set("sid", "value", url="https://example.com")
state = page.cookies.storage_state("state.json")
deleted = page.cookies.clear()

Console

page.console.listen()
page.evaluate("console.log('ready')")
messages = page.console.messages()

Trace And AI Authoring

Trace is a debug and AI-authoring surface. It is separate from normal runtime actions.

with hw.launch("https://example.com") as page:
    with page.trace.start_session("trace-example", mode="authoring") as trace:
        page.get_by_role("button", name="Submit").click()
        page.probe.forms(include_values=True)
        page.probe.state({"done": lambda p: "/done" in p.url})
    trace.report()

For deeper failure analysis:

with page.trace.start_session(
    "trace-debug",
    mode="failure_debug",
    network_bodies=True,
) as trace:
    page.probe.cookies()
    page.probe.storage()
    page.probe.listener_hints("button[type=submit]")

CLI capture for an already-running automation session:

python -m helixwright trace --session auto_123 --duration 15 --output trace-example
python -m helixwright trace --session auto_123 --mode failure_debug --network-bodies --output trace-debug

Client Managers

client = hw.Client()
print(client.health())
print(client.session())

profile = client.profiles.create(name="demo", proxy="http://127.0.0.1:7890")
profile.update(name="renamed")
profile.clone(count=2)
profile.sync_up()
profile.sync_down()

client.proxy.check("http://127.0.0.1:7890")
client.cores.list()
client.cores.ensure("chromium", "149.0.7827.156")
client.browser.active()
client.browser.start(profile.id)
client.browser.stop(profile.id)
client.browser.stop_all()
client.automation.list()
client.automation.stop("auto_123")

The SDK no longer exposes client.fingerprint or client.automation.start(). Use hw.launch() / client.automation.launch() so profile creation and session start remain one server-owned operation.

Error Types

Error Meaning
LocalApiUnavailable Desktop Local API is unreachable.
DesktopNotLoggedIn Desktop is reachable but not logged in.
LocalApiError Local API returned a business error.
ProfileNotFound The requested profile id does not exist.
AutomationEndpointUnavailable Local API/core did not return a usable V5 RPC endpoint.
AutomationSessionNotFound The requested automation session does not exist.
RpcError Browser RPC returned a structured error.
TransportError Browser RPC transport failed, usually because the browser exited.
WaitTimeoutError A page wait condition timed out.

Examples

cd "G:\Helix Browser\repos\helixwright"
python examples\99_offline_mock_demo.py
python examples\00_helixwright_quickstart.py
python examples\01_client_managers.py
python examples\02_launch_config_and_actions.py
python examples\03_native_trace_state_machine.py
python examples\04_public_facade_controllers.py

Metadata

Release files for helixwright 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for helixwright 0.6.1
File Size Uploaded Provenance Actions
helixwright-0.6.1.tar.gz 218.4 kB Without provenance Details for helixwright-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for helixwright 0.6.1
File Interpreter ABI Platform Actions
helixwright-0.6.1-py3-none-any.whl Python 3 none any Details for helixwright-0.6.1-py3-none-any.whl

Total release size: 410.2 kB

Release files / helixwright-0.6.1.tar.gz

Download URL helixwright-0.6.1.tar.gz
Size 218.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5fec491a3e85d20801eb314bcdbad61443dacf6b7896b3ab739d6ede52f0d154
BLAKE2b-256 checksum
How to use checksums
281341eedeb746ca6d23a0e16791dc4b966be3881cc503f569e6c705c0337234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Release files / helixwright-0.6.1-py3-none-any.whl

Download URL helixwright-0.6.1-py3-none-any.whl
Size 191.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56afa19fb4274bc3017d9fbefae729e17024236c78eba305fec17741bfb1c21e
BLAKE2b-256 checksum
How to use checksums
8d29e570a0a5678c034e3e78aea30601deae9d33fc4fb07f7e29c37cd364492a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Security for helixwright 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page