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 Distribution
Hashes for browserdebuggertools-2.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c95a29226e492db8cf01bdbc94258fa79094d912e82cd5e1105f65c7755332e0 |
|
MD5 | 6100884ff629838b672ab8b7b624794e |
|
BLAKE2b-256 | 65edcd72258c077412048bb9fbe381c390f17652e21252c5272c0aa744a8361e |
Hashes for browserdebuggertools-2.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c68ae36ce557c023393d85ff571ada1ef7a96540ba1de1097a92dc8629248d55 |
|
MD5 | b6ee2fec13421ff87d243f794ddefcd1 |
|
BLAKE2b-256 | ca799b01eb90df0045e6e9acd37f0befc8f683c31b87385620350d70d8c8e868 |