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, enable_name_spaces="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("Emulation.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-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a9d7bd23daa1d5cdcb8a46b8e96b92388ddcf00f0fe2e8f4eefc420cecde95 |
|
MD5 | e4ae4b88b8f020b9b421203829c9af2a |
|
BLAKE2b-256 | b88187f74fafe19ad040bf54f43827f88ae795a6a01fe0d28ff0452a3a2be4a5 |
Hashes for browserdebuggertools-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9503646b733758dd41fe639b4d5179e376ca047452e5d335f64504b17f4a339a |
|
MD5 | 906d47eccbecdad18d5fdc7eafe32f4d |
|
BLAKE2b-256 | dfc21eb0184c5c06b2fe635eed10096bd67d269d7cd34c7414bda14b601a6100 |
Hashes for browserdebuggertools-1.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6631e7490a447073a5221e63b6879407e0859ee3c1a957ff16daa009bf72dc07 |
|
MD5 | b0811a50cd0a906706f2670753ccd93f |
|
BLAKE2b-256 | 7d86f05db066b35796b10e6267573b9c0621e06b1c6518caa73871a4cfa46d77 |