Registry / testing / arsenic

arsenic

JSON →
library21.8pypypiunverified

An async Python WebDriver client for controlling browsers (e.g., Firefox, Chrome) via the W3C WebDriver protocol. Current version is 21.8, released with support for Python 3.7-3.11. Release cadence is sporadic; maintained primarily by HDE.

pip install arsenic
INSTALL
IMPORT
SIG · ARSENIC
A
arsenic
testingpythonv21.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

start_session
from arsenic import start_session
from arsenic import start_session

Basic example: launch a local Firefox session, navigate to example.com, and print the current URL.

import asyncio from arsenic import get_session, browsers, services async def example(): service = services.Geckodriver() browser = browsers.Firefox() async with get_session(service, browser) as session: await session.get('https://example.com') print(await session.get_url()) asyncio.run(example())
Debug
Known issues
breakingarsenic 21.x dropped support for Python 3.6 and earlier. Ensure your environment uses Python 3.7+.
fix
Upgrade to Python 3.7+ or pin to arsenic==20.x
affects: >=21.0
deprecatedThe 'Geckodriver' service now requires passing 'log_file' as a keyword argument (no longer positional).
fix
Use services.Geckodriver(log_file='/path/to/log') instead of positional arg.
affects: >=21.0
gotchaarsenic sessions use asyncio; you must call await on all browser methods. Forgetting leads to coroutine warnings.
fix
Always use await with session methods: await session.get(url), await session.get_page_source()
affects: all
Upgrade
Version history
21.8latest on PyPI · released Aug 23, 2021
Audit
Dependencies
aiohttprequireddefault HTTP client for browser communication
structlogoptionallogging support
Agent activity
41 hits · last 30 days
node
38
OpenAI (training)
1
Resources
arsenic — pip install arsenic · libregistry