Skip to main content

A client which calls remote web browser debugger methods

Project description


CirclCI PyPI Python License


The purpose is to provide a python client to connect to the debugger tools of a web-browser.

Currently supports connecting to Google-Chrome/Chromium over the devtools protocol, via a wrapped websockets client. Feel free to extend and add support for other browsers as required.

For improved performance, install the wsaccel python lib

Example Usage

Start Google-Chrome, passing a remote debugger port argument, for example on Ubuntu:

$ google-chrome-stable --remote-debugging-port=9899

In a python console, you can connect to the remote debugging port and enable the Page domain.

>> devtools_client = ChromeInterface(9899, domains={"Page": {}})

The client provides some devtools interface methods, for example:

>> with devtools_client.set_timeout(10):
   ... devtools_client.take_screenshot("/tmp/screenshot.png")

Or more generally you can call remote methods according to the devtools protocol spec (, for example

>> devtools_client.execute(domain="Network", method="enable")
>> devtools_client.execute("Network", "setUserAgentOverride", {"userAgent": "Test"})

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page