A client which calls remote web browser debugger methods
Project description
browser-debugger-tools
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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for browserdebuggertools-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1578459c62f7b679eac9e80fdff954e610e1146cd4bbf3fd0000118765118c80 |
|
MD5 | f044fdbd729f25560b924ea234b088c2 |
|
BLAKE2b-256 | c1a1526d154bc4a940b60f00d6fbc688a42129d20c0c4817eb3f2dd5d4449f40 |
Hashes for browserdebuggertools-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0eba458f9792edbdd7b8c2170551fbc807e13c51c1789699f9439f6573e1b0 |
|
MD5 | 15e2f6a9fb9e01c6e8075682176a5226 |
|
BLAKE2b-256 | 20ed0a759bf47ed52c7bb0fd6985ef882138b649e2c6fbc67fc5bcb1b5e5d028 |
Hashes for browserdebuggertools-1.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5666065758c076c96ee9f232239c3b2499a5d831566a813a33bd6c08250e9d1f |
|
MD5 | eb692025ad3ea9862f3c1c0f05e59de3 |
|
BLAKE2b-256 | 0be86c97f566f09d2079090cbc51d3ee681cf962febe00f75ca215bec4d80da9 |