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-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20650084fd5301760d0bd7fb966aa932041d0aff5481572deb60f163a58ae5bb |
|
MD5 | 4e77b1dd664949e142cf16a332f4deeb |
|
BLAKE2b-256 | 2fda0ddd4baeb89b0fe6086491603007df2662762e662174f9850de882b039c0 |
Hashes for browserdebuggertools-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f56a210c9fcb88ecd6c44d17dc3e3ef3faf8f7fc66d1accc4f19536ec9f046d4 |
|
MD5 | 163f935df6713eaa04e75f77445f463c |
|
BLAKE2b-256 | 72b89746187be66b3d38dfb14d716d9b7460bd94db7560ed93bc73c0794f2f3e |
Hashes for browserdebuggertools-2.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24ad7bc15f3cb5fe0fc477c1bbd228b66e4831a67d6f8a656aad632e64a912dd |
|
MD5 | 86fd77a04f3c6226113f864e8b0066bd |
|
BLAKE2b-256 | d8720a1eabcfa3fd8c0388df6b313e6ab921032c1af4547e174e25d249583377 |