browserdebuggertools-6.0.1
توضیحات
A client which calls remote web browser debugger methods
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | browserdebuggertools-6.0.1 |
| نام | browserdebuggertools |
| نسخه کتابخانه | 6.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | ThinkTribe LTD |
| ایمیل نویسنده | rd@scivisum.co.uk |
| آدرس صفحه اصلی | https://github.com/scivisum/browser-debugger-tools |
| آدرس اینترنتی | https://pypi.org/project/browserdebuggertools/ |
| مجوز | GNU General Public License v3 |
# browser-debugger-tools
[](https://travis-ci.org/scivisum/browser-debugger-tools)
[](https://pypi.python.org/pypi/browserdebuggertools)


## 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.
For improved performance, install the wsaccel python lib https://pypi.org/project/wsaccel/
## 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="Network", method="enable")
>> self.devtools_client.execute("Network", "setUserAgentOverride", {"userAgent": "Test"})
````
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
| - | websocket-client |
| - | typing |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl browserdebuggertools-6.0.1:
pip install browserdebuggertools-6.0.1.whl
نصب پکیج tar.gz browserdebuggertools-6.0.1:
pip install browserdebuggertools-6.0.1.tar.gz