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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53a60ce2a5dc4ca862f42e4fe0f2df914a76665faa25622449780c2b4635559f |
|
MD5 | 39ce40976f1b3b34fa5d2072632b6660 |
|
BLAKE2b-256 | 629f0a1e040114aede289c0e9e68bcf17da7d7f48a602a18d2682162547d2918 |
Hashes for browserdebuggertools-3.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 705c5a405b4e8be0260b233e45917f44e0262d3ea42ace84b8792a1433b8fb1e |
|
MD5 | 8e3f846a1d2cc5fdfe8183138a40fbcd |
|
BLAKE2b-256 | 9cc11e7af22f4640690a6d33f1beb8ab0fa8c4d5ec624a1802c333a509bc11a5 |
Hashes for browserdebuggertools-3.2.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed354a2c47b57af8f2465a10e6bf16f8b0ac962832306e218c2f938ad96f6276 |
|
MD5 | 9d31a6ae03d894e13a683cd19294153d |
|
BLAKE2b-256 | b75e60e834f4a00f00f64904a36d7bc36090bed472374d4fda5b5e54f89ba032 |