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.
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
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-5.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67d933b49625a164a77d54c491bf9d2189c0ac461f007f772b1abc57b2df2100 |
|
MD5 | a33b1bec92aad4a776603c7d24d07dce |
|
BLAKE2b-256 | 0796380172afa69431861648fc04628e554c3a06bdd5ae7342e822f5a8f5004d |
Hashes for browserdebuggertools-5.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 687e78f766aab7a8b3ccd41cbfa6469365f0744de15151c9ae98c04295630fae |
|
MD5 | 54c9662b6da12227ce3261cdf8ed94aa |
|
BLAKE2b-256 | 1eb99357d02cf59c3b92f7f3bf231e914396929868a2dac05bb5ae452a3b8f45 |
Hashes for browserdebuggertools-5.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3daef8ad830ab6fa83af6ecb89e82d72bb5c72dab761c68eb21aff05e0ab3c70 |
|
MD5 | 1190468a59ca1510502463fd7bd55e8d |
|
BLAKE2b-256 | 2051787e4e3f0f1d5f0d1bffb244d5996dfad2954c52aa0eac0a922de4842551 |