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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f1dcb46cd611dc8e2e5b4330fa098277c91e087884a8e1f1e66c541b8d84adb |
|
MD5 | 04e8bcb9bc4ed0a4d1ec11b62b58a849 |
|
BLAKE2b-256 | f5eefaad5c5e7ce41ebd57063db94e648191e81994b41572c4fab9787059b4b8 |
Hashes for browserdebuggertools-5.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18b3e4ea65ad418562d7f947762949159d5cf8cb384eeb50c7c78bd4dd717fda |
|
MD5 | e7ee5ee59cf58d43d18a22899ca7da5a |
|
BLAKE2b-256 | 4fa1cf65afa4b4ed30e28bca81fb626dffbec717e6dcc788a18f4427a8745826 |
Hashes for browserdebuggertools-5.2.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32c85936ff376bdf34a6772c126e7ef87ec683d8f90266763a85744d5bc8e703 |
|
MD5 | 8e794213718f64c9d2d129d93ad02ee1 |
|
BLAKE2b-256 | bbd5f125777a200fed6145e3439d1ad793d7aac31b6ae5d18f8e3d1c191e6c43 |