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-4.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0bc1e976761edf61f55841f5404f3767716e7eca577e3d33a248fce71b82e0c |
|
MD5 | 2653c63961984abfa62f95ddbf34c091 |
|
BLAKE2b-256 | b55b79820ba45b460b192aabf655145ae80243e13f8b2f311dd62a473b672fb9 |
Hashes for browserdebuggertools-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 898d46bbe0cf8af756a8a699bec7212befe64aa513d13170c58313351b6e43be |
|
MD5 | 90c79b44390906413e74cb348438ce1f |
|
BLAKE2b-256 | d08fd727e54d1c8b5a68ebcd0364b5fdc0472714005ea450fb8f5f3569ca94de |
Hashes for browserdebuggertools-4.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dca95ceec9809c7a3072be6a73ae019da069a77628427567fd217ef013fadbcd |
|
MD5 | eaef342132f3e953989ddd403da489eb |
|
BLAKE2b-256 | 0b592f98aab779ebad0d8a8fca9a49d851899dd1cabdd0f44995ff8935105311 |