Skip to main content

A client which calls remote web browser debugger methods

Project description

browser-debugger-tools

Build Status PyPI Python License

Overview

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 https://pypi.org/project/wsaccel/

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.

>> self.devtools_client = ChromeInterface(9899, domains=["Page"])

The client provides some devtools interface methods, for example:

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

Or more generally you can call remote methods according to the devtools protocol spec (https://chromedevtools.github.io/devtools-protocol/tot/Network), for example

>> self.devtools_client.execute(domain="Emulation", method="enable")
>> self.devtools_client.execute("Emulation", "setGeolocationOverride", args={"latitude": 20, "longitude": 35})

Project details


Download files

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

Source Distribution

browserdebuggertools-5.1.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

browserdebuggertools-5.1.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

browserdebuggertools-5.1.0-py2-none-any.whl (23.4 kB view details)

Uploaded Python 2

File details

Details for the file browserdebuggertools-5.1.0.tar.gz.

File metadata

  • Download URL: browserdebuggertools-5.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for browserdebuggertools-5.1.0.tar.gz
Algorithm Hash digest
SHA256 dc6a223fc5203123b10a6dd1fc8cc16ef2c1f7c3b559c836feae553324ded693
MD5 9763305fa53229d57d5b44d8546c93e2
BLAKE2b-256 2466bf2ee4a1bce214e68f6a446e29104963eb768db8332900da8198461e4588

See more details on using hashes here.

File details

Details for the file browserdebuggertools-5.1.0-py3-none-any.whl.

File metadata

  • Download URL: browserdebuggertools-5.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for browserdebuggertools-5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f291c156d969daea9e7ea3765c4cf9ba5989f67664de1b470ff30dcc8fa53481
MD5 53b09030caadc56dddb10514b59bfa50
BLAKE2b-256 bff8efde88e90cededb59d6290f14d60459e38bb8560caf1aa350ebfccef72b1

See more details on using hashes here.

File details

Details for the file browserdebuggertools-5.1.0-py2-none-any.whl.

File metadata

  • Download URL: browserdebuggertools-5.1.0-py2-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for browserdebuggertools-5.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 53425f425383dd5bae694d8bff96821fcb6b373ebea735aca7fc46f1e76c2183
MD5 3ef019b94055a112ffb9f4417d16c729
BLAKE2b-256 aafed2349ebdba7c44a1fc38abbf5105e784479a95905744d5716d85bc8cc983

See more details on using hashes here.

Supported by

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