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-3.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bca63d9da31a22bca045ef5eb0b87c717b1e5a1c33ec688300e815e29f92f58 |
|
MD5 | 68372381010ac54fdc59729e61718c6b |
|
BLAKE2b-256 | 382c4b48096d44b8db6453519c818ba0451ffcd31043d49c2a9750aaa0f189b1 |
Hashes for browserdebuggertools-3.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f54a7a857ecc8f2bfb1c3cee76ba5ac490810f39d066a2210dfdd310cfa97390 |
|
MD5 | 58a78c24dd28777e6b284735649ae282 |
|
BLAKE2b-256 | a19bd6df88c301d0ab60f59c69484e31f094a62637d9977333dd3cdfb8b26c1c |
Hashes for browserdebuggertools-3.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f964fb6b8ce1a38f5c8096977dd989fbcc2dd820b330ee55f6a0931a03971466 |
|
MD5 | 40987418ae921e6b63acb18d02b5d294 |
|
BLAKE2b-256 | 37c899a326c19dd6a0361a5bbc2c24cf78f82c37c94d9f206f7c0e046879ee96 |