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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | df2c2190a9eedd335adb425149117e222c0c0a2d1e2a04d7d848225466692e98 |
|
MD5 | ae473ceb9f61fa7ab4ebc8b94c14042a |
|
BLAKE2b-256 | 4e818f2e6064ac1e8c9b468c9ffa7d8a2194a5b5f14190fb72e66b5f5be15112 |
Hashes for browserdebuggertools-5.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 184189a49d0c43ec79ec5af86bad624943135e97893ccb9f9c63385f97107e30 |
|
MD5 | 5489e7647235aacd1e6b2b60cf6c5e00 |
|
BLAKE2b-256 | 499affe1caa0ffd2d19d6ee2e4763be30ea6d27e340030a5a6e7a971e0a160d8 |
Hashes for browserdebuggertools-5.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b916cb8f5c9e0d82e52e1c14946290894b9eae9ae586a76283ca8f017d16e660 |
|
MD5 | 72342df88b90ed314e4e2b746958c267 |
|
BLAKE2b-256 | 9e084b995c3a3bb92b058b8baa842da3175941d110a068d28f70a81119896bbd |