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-5.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd5837b0db6f9b5f0293a387e5efad62fd742a58f511237a28bdcb86009d5bee |
|
MD5 | 8259acee0e69b249157b8ef5dbbbd1e7 |
|
BLAKE2b-256 | 20cdbbc0ed174eb7507c227468ce1991c192320c917f9ecda060bf93044ecb41 |
Hashes for browserdebuggertools-5.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 637ff90bce58b4919ef3919304cdddde685e21f9723d8dff261bfc60bf1775da |
|
MD5 | 476ff116049db2bdf36cdd7e1ed8fd45 |
|
BLAKE2b-256 | 4fa31e0c0780592aab5b38f695f1a779d2f7be04e29733da91985f5bca2d8313 |
Hashes for browserdebuggertools-5.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa8d26f945b9991ebacfb3cdf0b261c7e6a9bc74539cb046cee5896d405b3483 |
|
MD5 | 90072b9f91622f21ce212b57ba0c496b |
|
BLAKE2b-256 | 36bcb32a8f766e152801148b84db191e681b092da29f588db2a7baab83ab60ac |