browsix 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- browsix-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- browsix-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- browsix-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +21 -0
- browsix-1.0.0/.github/workflows/ci.yml +56 -0
- browsix-1.0.0/.github/workflows/docs.yml +42 -0
- browsix-1.0.0/.github/workflows/release.yml +62 -0
- browsix-1.0.0/.github/workflows/serve-test.yml +22 -0
- browsix-1.0.0/.gitignore +25 -0
- browsix-1.0.0/CHANGELOG.md +80 -0
- browsix-1.0.0/CODE_OF_CONDUCT.md +132 -0
- browsix-1.0.0/CONTRIBUTING.md +124 -0
- browsix-1.0.0/Dockerfile +12 -0
- browsix-1.0.0/LICENSE +21 -0
- browsix-1.0.0/PKG-INFO +128 -0
- browsix-1.0.0/README.md +83 -0
- browsix-1.0.0/SECURITY.md +46 -0
- browsix-1.0.0/browsix/__init__.py +3 -0
- browsix-1.0.0/browsix/__main__.py +6 -0
- browsix-1.0.0/browsix/actions/__init__.py +1 -0
- browsix-1.0.0/browsix/actions/accessibility.py +53 -0
- browsix-1.0.0/browsix/actions/animation.py +59 -0
- browsix-1.0.0/browsix/actions/base.py +26 -0
- browsix-1.0.0/browsix/actions/bluetooth.py +68 -0
- browsix-1.0.0/browsix/actions/browser.py +39 -0
- browsix-1.0.0/browsix/actions/cast.py +67 -0
- browsix-1.0.0/browsix/actions/console.py +57 -0
- browsix-1.0.0/browsix/actions/css.py +96 -0
- browsix-1.0.0/browsix/actions/debug.py +134 -0
- browsix-1.0.0/browsix/actions/dialog.py +50 -0
- browsix-1.0.0/browsix/actions/dom.py +70 -0
- browsix-1.0.0/browsix/actions/dom_snapshot.py +45 -0
- browsix-1.0.0/browsix/actions/download.py +38 -0
- browsix-1.0.0/browsix/actions/emulation.py +45 -0
- browsix-1.0.0/browsix/actions/eval.py +36 -0
- browsix-1.0.0/browsix/actions/har.py +27 -0
- browsix-1.0.0/browsix/actions/input.py +62 -0
- browsix-1.0.0/browsix/actions/media.py +62 -0
- browsix-1.0.0/browsix/actions/multi.py +29 -0
- browsix-1.0.0/browsix/actions/navigate.py +98 -0
- browsix-1.0.0/browsix/actions/network.py +70 -0
- browsix-1.0.0/browsix/actions/overlay.py +61 -0
- browsix-1.0.0/browsix/actions/pdf.py +32 -0
- browsix-1.0.0/browsix/actions/performance.py +69 -0
- browsix-1.0.0/browsix/actions/permissions.py +50 -0
- browsix-1.0.0/browsix/actions/scrape.py +50 -0
- browsix-1.0.0/browsix/actions/screencast.py +44 -0
- browsix-1.0.0/browsix/actions/screenshot.py +37 -0
- browsix-1.0.0/browsix/actions/security.py +50 -0
- browsix-1.0.0/browsix/actions/service_worker.py +69 -0
- browsix-1.0.0/browsix/actions/storage.py +92 -0
- browsix-1.0.0/browsix/actions/tabs.py +53 -0
- browsix-1.0.0/browsix/actions/webaudio.py +62 -0
- browsix-1.0.0/browsix/actions/webauthn.py +96 -0
- browsix-1.0.0/browsix/auth.py +86 -0
- browsix-1.0.0/browsix/backend/__init__.py +1 -0
- browsix-1.0.0/browsix/backend/base.py +829 -0
- browsix-1.0.0/browsix/backend/bidi.py +953 -0
- browsix-1.0.0/browsix/backend/cdp.py +2339 -0
- browsix-1.0.0/browsix/backend/manager.py +114 -0
- browsix-1.0.0/browsix/cli/__init__.py +8 -0
- browsix-1.0.0/browsix/cli/app.py +2409 -0
- browsix-1.0.0/browsix/config.py +589 -0
- browsix-1.0.0/browsix/exceptions.py +61 -0
- browsix-1.0.0/browsix/multi.py +156 -0
- browsix-1.0.0/browsix/output.py +142 -0
- browsix-1.0.0/browsix/plugins.py +101 -0
- browsix-1.0.0/browsix/record.py +105 -0
- browsix-1.0.0/browsix/serve.py +343 -0
- browsix-1.0.0/docs/backends.md +73 -0
- browsix-1.0.0/docs/commands.md +221 -0
- browsix-1.0.0/docs/contributing.md +70 -0
- browsix-1.0.0/docs/index.md +44 -0
- browsix-1.0.0/docs/install.md +51 -0
- browsix-1.0.0/docs/multi.md +82 -0
- browsix-1.0.0/docs/quickstart.md +65 -0
- browsix-1.0.0/docs/raw.md +52 -0
- browsix-1.0.0/docs/troubleshooting.md +69 -0
- browsix-1.0.0/mkdocs.yml +44 -0
- browsix-1.0.0/pyproject.toml +81 -0
- browsix-1.0.0/tests/__init__.py +1 -0
- browsix-1.0.0/tests/conftest.py +11 -0
- browsix-1.0.0/tests/integration/__init__.py +1 -0
- browsix-1.0.0/tests/integration/test_a11y.py +37 -0
- browsix-1.0.0/tests/integration/test_animation.py +32 -0
- browsix-1.0.0/tests/integration/test_backend_selection.py +38 -0
- browsix-1.0.0/tests/integration/test_browser.py +63 -0
- browsix-1.0.0/tests/integration/test_console.py +46 -0
- browsix-1.0.0/tests/integration/test_css.py +56 -0
- browsix-1.0.0/tests/integration/test_debug.py +51 -0
- browsix-1.0.0/tests/integration/test_dialog.py +29 -0
- browsix-1.0.0/tests/integration/test_dom.py +124 -0
- browsix-1.0.0/tests/integration/test_dom_snapshot.py +29 -0
- browsix-1.0.0/tests/integration/test_emulation.py +85 -0
- browsix-1.0.0/tests/integration/test_emulation_advanced.py +49 -0
- browsix-1.0.0/tests/integration/test_eval.py +66 -0
- browsix-1.0.0/tests/integration/test_har.py +51 -0
- browsix-1.0.0/tests/integration/test_input.py +44 -0
- browsix-1.0.0/tests/integration/test_media.py +32 -0
- browsix-1.0.0/tests/integration/test_multi.py +55 -0
- browsix-1.0.0/tests/integration/test_navigate.py +49 -0
- browsix-1.0.0/tests/integration/test_network.py +117 -0
- browsix-1.0.0/tests/integration/test_network_advanced.py +40 -0
- browsix-1.0.0/tests/integration/test_overlay.py +40 -0
- browsix-1.0.0/tests/integration/test_pdf.py +64 -0
- browsix-1.0.0/tests/integration/test_perf.py +106 -0
- browsix-1.0.0/tests/integration/test_permissions.py +21 -0
- browsix-1.0.0/tests/integration/test_raw.py +80 -0
- browsix-1.0.0/tests/integration/test_record.py +57 -0
- browsix-1.0.0/tests/integration/test_scrape.py +67 -0
- browsix-1.0.0/tests/integration/test_screenshot.py +64 -0
- browsix-1.0.0/tests/integration/test_security.py +20 -0
- browsix-1.0.0/tests/integration/test_serve.py +77 -0
- browsix-1.0.0/tests/integration/test_service_worker.py +32 -0
- browsix-1.0.0/tests/integration/test_storage.py +124 -0
- browsix-1.0.0/tests/integration/test_tabs.py +39 -0
- browsix-1.0.0/tests/integration/test_webaudio.py +32 -0
- browsix-1.0.0/tests/integration/test_webauthn.py +60 -0
- browsix-1.0.0/tests/unit/__init__.py +1 -0
- browsix-1.0.0/tests/unit/test_abstract_backend_phase5.py +75 -0
- browsix-1.0.0/tests/unit/test_actions.py +510 -0
- browsix-1.0.0/tests/unit/test_actions_phase5.py +143 -0
- browsix-1.0.0/tests/unit/test_animation_action.py +87 -0
- browsix-1.0.0/tests/unit/test_auth.py +112 -0
- browsix-1.0.0/tests/unit/test_backend_manager.py +459 -0
- browsix-1.0.0/tests/unit/test_bidi_backend.py +145 -0
- browsix-1.0.0/tests/unit/test_bidi_phase5.py +99 -0
- browsix-1.0.0/tests/unit/test_bluetooth_action.py +73 -0
- browsix-1.0.0/tests/unit/test_cast_action.py +65 -0
- browsix-1.0.0/tests/unit/test_cli_phase5.py +98 -0
- browsix-1.0.0/tests/unit/test_config.py +292 -0
- browsix-1.0.0/tests/unit/test_config_phase5.py +105 -0
- browsix-1.0.0/tests/unit/test_css_action.py +106 -0
- browsix-1.0.0/tests/unit/test_debug_action.py +156 -0
- browsix-1.0.0/tests/unit/test_dom_snapshot_action.py +47 -0
- browsix-1.0.0/tests/unit/test_download_screencast.py +65 -0
- browsix-1.0.0/tests/unit/test_emulation_action.py +74 -0
- browsix-1.0.0/tests/unit/test_error_handling.py +94 -0
- browsix-1.0.0/tests/unit/test_exceptions.py +55 -0
- browsix-1.0.0/tests/unit/test_input_action.py +91 -0
- browsix-1.0.0/tests/unit/test_manager.py +184 -0
- browsix-1.0.0/tests/unit/test_media_action.py +62 -0
- browsix-1.0.0/tests/unit/test_multi.py +117 -0
- browsix-1.0.0/tests/unit/test_output.py +87 -0
- browsix-1.0.0/tests/unit/test_overlay_action.py +82 -0
- browsix-1.0.0/tests/unit/test_perf_action.py +120 -0
- browsix-1.0.0/tests/unit/test_plugins.py +74 -0
- browsix-1.0.0/tests/unit/test_raw.py +83 -0
- browsix-1.0.0/tests/unit/test_record.py +80 -0
- browsix-1.0.0/tests/unit/test_serve.py +314 -0
- browsix-1.0.0/tests/unit/test_service_worker_action.py +72 -0
- browsix-1.0.0/tests/unit/test_storage_action.py +148 -0
- browsix-1.0.0/tests/unit/test_webaudio_action.py +61 -0
- browsix-1.0.0/tests/unit/test_webauthn_action.py +128 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: Bug Report
|
|
4
|
+
about: Report a bug to help us improve browsix
|
|
5
|
+
title: "[BUG] "
|
|
6
|
+
labels: bug
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
|
|
11
|
+
A clear and concise description of the bug.
|
|
12
|
+
|
|
13
|
+
## Steps to Reproduce
|
|
14
|
+
|
|
15
|
+
1. Run `browsix ...`
|
|
16
|
+
2. ...
|
|
17
|
+
3. See error
|
|
18
|
+
|
|
19
|
+
## Expected Behavior
|
|
20
|
+
|
|
21
|
+
What you expected to happen.
|
|
22
|
+
|
|
23
|
+
## Actual Behavior
|
|
24
|
+
|
|
25
|
+
What actually happened.
|
|
26
|
+
|
|
27
|
+
## Environment
|
|
28
|
+
|
|
29
|
+
- browsix version: `browsix --version` (or pip show browsix)
|
|
30
|
+
- Python version: `python --version`
|
|
31
|
+
- OS: [e.g. Windows 11, Ubuntu 22.04, macOS 14]
|
|
32
|
+
- Browser: [e.g. Chrome 125, Edge 125, Brave 1.65]
|
|
33
|
+
- Backend: [cdp / bidi]
|
|
34
|
+
|
|
35
|
+
## Additional Context
|
|
36
|
+
|
|
37
|
+
Any other context, logs, or screenshots.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: Feature Request
|
|
4
|
+
about: Suggest a new feature or improvement for browsix
|
|
5
|
+
title: "[FEATURE] "
|
|
6
|
+
labels: enhancement
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
A clear description of the problem this feature would solve.
|
|
12
|
+
|
|
13
|
+
## Proposed Solution
|
|
14
|
+
|
|
15
|
+
A description of what you want to happen.
|
|
16
|
+
|
|
17
|
+
## Alternatives Considered
|
|
18
|
+
|
|
19
|
+
Any alternative solutions or features you've considered.
|
|
20
|
+
|
|
21
|
+
## Additional Context
|
|
22
|
+
|
|
23
|
+
Any other context, examples, or references.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Brief description of the changes.
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Refactor / cleanup
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
|
|
15
|
+
- [ ] Code follows PEP 8 and passes `ruff check .`
|
|
16
|
+
- [ ] Type hints on all parameters and return types
|
|
17
|
+
- [ ] `mypy browsix/` passes
|
|
18
|
+
- [ ] Tests added or updated for changes
|
|
19
|
+
- [ ] `pytest tests/unit/ -v` passes
|
|
20
|
+
- [ ] Conventional commit message used
|
|
21
|
+
- [ ] Documentation updated if needed
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
name: Lint (ruff)
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.11"
|
|
18
|
+
- run: pip install "ruff>=0.4"
|
|
19
|
+
- run: ruff check .
|
|
20
|
+
|
|
21
|
+
typecheck:
|
|
22
|
+
name: Typecheck (mypy)
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.11"
|
|
29
|
+
- run: pip install -e ".[dev,cdp,bidi]"
|
|
30
|
+
- run: mypy browsix/ --ignore-missing-imports
|
|
31
|
+
|
|
32
|
+
unit-tests:
|
|
33
|
+
name: Unit tests
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.11"
|
|
40
|
+
- run: pip install -e ".[dev,cdp,bidi]"
|
|
41
|
+
- run: pytest tests/unit/ -m unit -v
|
|
42
|
+
|
|
43
|
+
integration-tests:
|
|
44
|
+
name: Integration tests
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
- uses: actions/setup-python@v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: "3.11"
|
|
51
|
+
- uses: browser-actions/setup-chrome@v1
|
|
52
|
+
with:
|
|
53
|
+
chrome-version: stable
|
|
54
|
+
- run: pip install -e ".[dev,cdp]"
|
|
55
|
+
- run: pytest tests/integration/ -m integration -v
|
|
56
|
+
continue-on-error: true
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build-docs:
|
|
19
|
+
name: Build mkdocs site
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.11"
|
|
26
|
+
- run: pip install -e ".[docs]"
|
|
27
|
+
- run: mkdocs build --strict
|
|
28
|
+
- uses: actions/configure-pages@v5
|
|
29
|
+
- uses: actions/upload-pages-artifact@v3
|
|
30
|
+
with:
|
|
31
|
+
path: site/
|
|
32
|
+
|
|
33
|
+
deploy-docs:
|
|
34
|
+
name: Deploy to GitHub Pages
|
|
35
|
+
needs: build-docs
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
environment:
|
|
38
|
+
name: github-pages
|
|
39
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
40
|
+
steps:
|
|
41
|
+
- id: deployment
|
|
42
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: Build sdist + wheel
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
- run: pip install "build>=1.2"
|
|
23
|
+
- run: python -m build
|
|
24
|
+
- uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: dist
|
|
27
|
+
path: dist/
|
|
28
|
+
|
|
29
|
+
publish-pypi:
|
|
30
|
+
name: Publish to PyPI
|
|
31
|
+
needs: build
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
environment: pypi
|
|
34
|
+
permissions:
|
|
35
|
+
id-token: write
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/download-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: dist
|
|
40
|
+
path: dist/
|
|
41
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
42
|
+
|
|
43
|
+
publish-docs:
|
|
44
|
+
name: Publish docs to GitHub Pages
|
|
45
|
+
needs: build
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
environment:
|
|
48
|
+
name: github-pages
|
|
49
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
- uses: actions/setup-python@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: "3.11"
|
|
55
|
+
- run: pip install -e ".[docs]"
|
|
56
|
+
- run: mkdocs build --strict
|
|
57
|
+
- uses: actions/configure-pages@v5
|
|
58
|
+
- uses: actions/upload-pages-artifact@v3
|
|
59
|
+
with:
|
|
60
|
+
path: site/
|
|
61
|
+
- id: deployment
|
|
62
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Serve Mode Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
serve-test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
- run: pip install -e ".[cdp,serve,dev]" pytest-aiohttp
|
|
18
|
+
- uses: browser-actions/setup-chrome@v1
|
|
19
|
+
- name: Run serve mode unit tests
|
|
20
|
+
run: pytest tests/unit/test_serve.py -v
|
|
21
|
+
- name: Run serve mode integration tests
|
|
22
|
+
run: pytest tests/integration/test_serve.py -v -m integration
|
browsix-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.eggs/
|
|
8
|
+
*.egg
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
env/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
coverage.xml
|
|
17
|
+
htmlcov/
|
|
18
|
+
*.so
|
|
19
|
+
.idea/
|
|
20
|
+
.vscode/
|
|
21
|
+
*.swp
|
|
22
|
+
*.swo
|
|
23
|
+
site/
|
|
24
|
+
spike.png
|
|
25
|
+
spike.py
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to browsix are documented in this file.
|
|
4
|
+
|
|
5
|
+
## v1.0.0 — 2026-07-05
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Error handling with consistent exit codes (0 success, 1 browser, 2 config, 3 backend)
|
|
10
|
+
- `Output.error()`, `Output.success()`, `Output.info()` with optional rich formatting
|
|
11
|
+
- Global CLI flags: `--verbose`, `--quiet`, `--version`
|
|
12
|
+
- Shell completions command (`browsix completions <shell>`)
|
|
13
|
+
- GitHub Actions CI workflow (lint, typecheck, unit tests, integration tests)
|
|
14
|
+
- GitHub Actions release workflow (PyPI publish, GitHub Pages docs)
|
|
15
|
+
- mkdocs documentation site with material theme
|
|
16
|
+
- Comprehensive README with badges, examples, and comparison table
|
|
17
|
+
- Troubleshooting guide
|
|
18
|
+
- Contributing guide
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Version bumped to 1.0.0
|
|
23
|
+
- Development status classifier updated to "Production/Stable"
|
|
24
|
+
- CLI help strings improved for all commands and options
|
|
25
|
+
- All error messages now use `Output.error()` for consistent formatting
|
|
26
|
+
|
|
27
|
+
## v0.3.0 — 2026-06-28
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- Emulation commands: device, viewport, geolocation, timezone, dark mode
|
|
32
|
+
- `EmulationAction` class for emulation operations
|
|
33
|
+
- `MultiAction` class for YAML multi-action execution
|
|
34
|
+
- `multi` CLI command with YAML config parsing
|
|
35
|
+
- `backends` CLI command to list available backends
|
|
36
|
+
- `install_check` CLI command to check backend installation status
|
|
37
|
+
- Global `--backend` CLI flag for backend selection
|
|
38
|
+
- `WAIT_PRESETS` and `THROTTLE_PRESETS` config dictionaries
|
|
39
|
+
- `EmulationParams` dataclass
|
|
40
|
+
- `MultiConfigError` exception for invalid multi configs
|
|
41
|
+
- `BackendManager.install_check()` method
|
|
42
|
+
- `BackendManager.list_available()` method
|
|
43
|
+
- `BackendManager.select(preferred)` with preferred backend support
|
|
44
|
+
|
|
45
|
+
## v0.2.0 — 2026-06-14
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- DOM operations: get, query, set attribute, remove attribute, remove, focus, scroll
|
|
50
|
+
- HAR capture for network traffic analysis
|
|
51
|
+
- Cookie management: get, set, delete, clear
|
|
52
|
+
- Extra HTTP headers setting
|
|
53
|
+
- User-Agent override
|
|
54
|
+
- Browser context management
|
|
55
|
+
- Tab management: list, new, close, activate
|
|
56
|
+
- Console message capture
|
|
57
|
+
- Browser log capture
|
|
58
|
+
- Scrape command for batch URL processing
|
|
59
|
+
- `DOMAction`, `HARAction`, `TabsAction`, `ConsoleAction` classes
|
|
60
|
+
- `CookieParams`, `HarParams`, `DOMParams`, `TabsParams`, `ConsoleParams` dataclasses
|
|
61
|
+
- Device presets dictionary
|
|
62
|
+
- Paper sizes dictionary
|
|
63
|
+
|
|
64
|
+
## v0.1.0 — 2026-05-30
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- Initial browsix release
|
|
69
|
+
- `AbstractBackend` interface with all core methods
|
|
70
|
+
- `CDPBackend` implementation using cdpwave
|
|
71
|
+
- `BiDiBackend` minimal implementation using bidiwave
|
|
72
|
+
- `BackendManager` for backend registration and selection
|
|
73
|
+
- Core CLI commands: screenshot, pdf, eval, navigate, back, forward, reload, stop
|
|
74
|
+
- `ScreenshotAction`, `PDFAction`, `EvalAction`, `NavigateAction` classes
|
|
75
|
+
- `BrowserOptions`, `ScreenshotParams`, `PDFParams`, `EvalParams` dataclasses
|
|
76
|
+
- `WaitStrategy` with load, domcontentloaded, selector, networkidle strategies
|
|
77
|
+
- `Output` helpers for bytes, JSON, text, CSV
|
|
78
|
+
- Exception hierarchy: `BrowsixError`, `BackendNotAvailableError`, `NavigationError`, `WaitTimeoutError`, `ElementNotFoundError`
|
|
79
|
+
- Typer CLI with help strings and no-args-is-help
|
|
80
|
+
- Unit and integration test infrastructure
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best for the overall community, not just us as
|
|
26
|
+
individuals
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned with this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
**mathias.paulenko@outlook.com**.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://www.mozilla.org/en-US/about/governance/policies/anti-harassment/
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Contributing to browsix
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to browsix! This document outlines
|
|
4
|
+
the process for contributing bug reports, feature requests, code changes, and
|
|
5
|
+
documentation improvements.
|
|
6
|
+
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
### Prerequisites
|
|
10
|
+
|
|
11
|
+
- Python 3.11 or higher
|
|
12
|
+
- A Chromium-based browser (Chrome, Edge, Brave, or Chromium)
|
|
13
|
+
- Git
|
|
14
|
+
|
|
15
|
+
### Development Setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
git clone https://github.com/MathiasPaulenko/browsix.git
|
|
19
|
+
cd browsix
|
|
20
|
+
pip install -e ".[cdp,dev]"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Running Tests
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Unit tests (no browser required)
|
|
27
|
+
pytest tests/unit/ -v --cov=browsix --cov-report=term-missing
|
|
28
|
+
|
|
29
|
+
# Linting and type checking
|
|
30
|
+
ruff check .
|
|
31
|
+
mypy browsix/
|
|
32
|
+
|
|
33
|
+
# Spike test (requires Chrome installed)
|
|
34
|
+
python spike.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Project Structure
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
browsix/
|
|
41
|
+
├── browsix/ # Source code
|
|
42
|
+
│ ├── cli/ # Typer CLI commands
|
|
43
|
+
│ ├── backend/ # Backend abstraction (CDPBackend, BiDiBackend)
|
|
44
|
+
│ ├── actions/ # Action classes (ScreenshotAction, etc.)
|
|
45
|
+
│ ├── config.py # Dataclasses for params and presets
|
|
46
|
+
│ ├── auth.py # Auth context loader
|
|
47
|
+
│ ├── output.py # Output helpers (file, stdout, JSON)
|
|
48
|
+
│ └── exceptions.py # Custom exceptions
|
|
49
|
+
├── tests/ # Test suite
|
|
50
|
+
│ ├── unit/ # Unit tests with mocks
|
|
51
|
+
│ └── integration/ # Integration tests (require Chrome)
|
|
52
|
+
├── docs/ # Documentation
|
|
53
|
+
└── pyproject.toml # Project configuration
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## How to Contribute
|
|
57
|
+
|
|
58
|
+
### Reporting Bugs
|
|
59
|
+
|
|
60
|
+
Before creating a bug report, check existing issues to avoid duplicates. When
|
|
61
|
+
creating a bug report, use the **Bug Report** issue template and include:
|
|
62
|
+
|
|
63
|
+
1. A clear description of the problem
|
|
64
|
+
2. Steps to reproduce the issue
|
|
65
|
+
3. Expected vs actual behavior
|
|
66
|
+
4. browsix version, Python version, OS, and browser version
|
|
67
|
+
5. Minimal command example (if applicable)
|
|
68
|
+
|
|
69
|
+
### Suggesting Features
|
|
70
|
+
|
|
71
|
+
Use the **Feature Request** issue template. Describe:
|
|
72
|
+
|
|
73
|
+
1. The problem your feature would solve
|
|
74
|
+
2. The proposed solution
|
|
75
|
+
3. Alternatives you've considered
|
|
76
|
+
|
|
77
|
+
### Pull Requests
|
|
78
|
+
|
|
79
|
+
1. **Fork** the repository and create your branch from `main`
|
|
80
|
+
2. **Write tests** for your changes — unit tests are required for new features
|
|
81
|
+
3. **Ensure all checks pass**:
|
|
82
|
+
```bash
|
|
83
|
+
ruff check .
|
|
84
|
+
mypy browsix/
|
|
85
|
+
pytest tests/unit/ -v
|
|
86
|
+
```
|
|
87
|
+
4. **Use conventional commit messages**:
|
|
88
|
+
- `feat:` new feature
|
|
89
|
+
- `fix:` bug fix
|
|
90
|
+
- `docs:` documentation only
|
|
91
|
+
- `refactor:` code change that neither fixes a bug nor adds a feature
|
|
92
|
+
- `test:` adding or correcting tests
|
|
93
|
+
- `chore:` tooling, dependencies, config
|
|
94
|
+
5. **Keep PRs focused** — one feature or fix per PR
|
|
95
|
+
6. **Update documentation** if your change affects the public API
|
|
96
|
+
|
|
97
|
+
### Code Style
|
|
98
|
+
|
|
99
|
+
- Follow PEP 8 (enforced by ruff, line-length=100)
|
|
100
|
+
- Use type hints for all function parameters and return types
|
|
101
|
+
- Write docstrings in Google style for all public methods
|
|
102
|
+
- Prefer small, single-responsibility functions
|
|
103
|
+
- No comments that don't add value — the code should be self-documenting
|
|
104
|
+
|
|
105
|
+
## Release Process
|
|
106
|
+
|
|
107
|
+
Releases are managed by the maintainer:
|
|
108
|
+
|
|
109
|
+
1. Version bump in `pyproject.toml` and `browsix/__init__.py`
|
|
110
|
+
2. Create annotated git tag (`vX.Y.Z`)
|
|
111
|
+
3. GitHub Actions builds and publishes to PyPI automatically
|
|
112
|
+
|
|
113
|
+
Versioning follows [Semantic Versioning](https://semver.org/):
|
|
114
|
+
- **MAJOR**: breaking API changes
|
|
115
|
+
- **MINOR**: new features, backwards compatible
|
|
116
|
+
- **PATCH**: bug fixes, backwards compatible
|
|
117
|
+
|
|
118
|
+
## Questions?
|
|
119
|
+
|
|
120
|
+
Feel free to open a **Question** issue or reach out at
|
|
121
|
+
**mathias.paulenko@outlook.com**.
|
|
122
|
+
|
|
123
|
+
By participating in this project, you agree to abide by the
|
|
124
|
+
[Code of Conduct](CODE_OF_CONDUCT.md).
|
browsix-1.0.0/Dockerfile
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
|
|
3
|
+
RUN apt-get update && apt-get install -y \
|
|
4
|
+
chromium \
|
|
5
|
+
--no-install-recommends \
|
|
6
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
7
|
+
|
|
8
|
+
RUN pip install browsix[cdp,serve]
|
|
9
|
+
|
|
10
|
+
EXPOSE 8080
|
|
11
|
+
|
|
12
|
+
CMD ["browsix", "serve", "--port", "8080", "--host", "0.0.0.0"]
|
browsix-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mathias Paulenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|