Skip to main content

Plain English web test automation using Selenium and Playwright. No code. No maintenance.

Project description

goose-chase-web

PyPI version Python 3.8+ License: MIT

Dependencies

  • Python 3.8+
  • A supported browser installed on your machine (Chrome, Firefox, Safari, or Edge)

Everything else — Playwright, pytest, pytest-html — is installed automatically by goose-chase init.


Install

pip install goose-chase-web

Quick start

pip install goose-chase-web
goose-chase init
pytest web-tests/

goose-chase init creates your project structure, installs pytest and pytest-html, installs browser binaries, and generates sample tests ready to run.


What goose-chase init creates

your-project/
├── goose-chase.web.config.py   ← configure URL, browser, headless mode
├── pytest.ini               ← pytest settings
└── web-tests/
    ├── test_english.py      ← English instruction style tests
    └── test_pythonic.py     ← Pythonic API style tests

After running your tests:

your-project/
└── report.html              ← test report (open in browser)

Configuration

Edit goose-chase.web.config.py in your project root to point at your site and set your preferences:

# URL of the site under test
URL = "https://yourapp.com"

# Browser to use: chrome | firefox | safari | edge
# chrome  — Google Chrome (must be installed)
# firefox — Mozilla Firefox (must be installed)
# safari  — Safari via WebKit (macOS only)
# edge    — Microsoft Edge (must be installed)
BROWSER = "chrome"

# Run browser without a visible window (True for CI, False for local debugging)
HEADLESS = False

# Launch browser maximized (ignored when HEADLESS = True)
MAXIMIZED = True

# Maximum time in milliseconds to wait for elements and page loads
TIMEOUT = 10_000

# Directory where report.html is saved after each test run
RESULT_DIR = "test_report"

# Capture a screenshot when a step fails and embed it in the report
SCREENSHOTS_ON_FAILURE = False

Two ways to write tests

English — human readable, shareable with non-developers:

def test_login(agent):
    agent.run([
        'type "harish@example.com" into "Email"',
        'type "secret123" into "Password"',
        'click "Sign in"',
        'verify text "Dashboard" is present',
    ])

Pythonic — IDE guided, autocomplete friendly:

def test_login(agent):
    (agent
        .type("harish@example.com", into="Email")
        .type("secret123", into="Password")
        .click("Sign in")
        .verify_text("Dashboard")
    )

Supported instructions

Actions

Instruction Example
Type into a field type "value" into "Field Label"
Click an element click "Button Text"
Click by position click "Add to cart" below "Product Name"
Click near element click "Edit" near "John Smith"
Click nth element click second "Add to cart"
Select a dropdown select "Option" from "dropdown_name"
Hover over element hover "element"
Press a key press Enter
Navigate to URL navigate "https://yourapp.com/page"

Verification

Instruction Example
Verify text is present verify text "Welcome" is present
Verify element is present verify "Submit" is present
Verify element is visible verify "Submit" is visible
Verify text next to element verify text next to "Balance" is "$100.00"
Verify text below element verify text below "Total" is "$29.99"

Extraction

Instruction Example
Extract from element extract text from "element_class"
Extract nth extract text from first "item name"
Extract next to element extract text next to "Balance"
Extract near element extract text near "Balance"
Extract below element extract text below "Label"
Extract above element extract text above "Label"
Capture into variable {{price}} = extract text next to "Total"

Spatial targeting

Use element position when there's no unique visible text:

# Pythonic
agent.click("Add to cart", below="Sauce Labs Backpack")
agent.click("Edit", next_to="John Smith")
agent.extract_text(next_to="Balance")

# English
agent.run('click "Add to cart" below "Sauce Labs Backpack"')
agent.run('extract text next to "Balance"')

Supported directions: next to, below, above, left of, right of, near


Extracting values

# Direct return
price = agent.run('extract text next to "Total"')
assert price == "$29.99"

# Variable capture inside run()
agent.run('{{balance}} = extract text next to "Balance"')
balance = agent.get("balance")

# Pythonic
price = agent.extract_text(next_to="Total")

Using variables in tests

username = "standard_user"
password = "secret_sauce"

def test_login(agent):
    agent.run([
        f'type "{username}" into "Username"',   # f-strings for Python variables
        f'type "{password}" into "Password"',
        'click "Login"',
        'verify text "Products" is present',
    ])

Running tests

# Run all tests
pytest web-tests/

# Run a single test
pytest web-tests/test_english.py::test_login

# Run headless (no browser window)
HEADLESS=True pytest web-tests/

# View the report
open report.html

Supported browsers

Config value Browser
chrome Google Chrome
firefox Mozilla Firefox
safari Safari (macOS only)
edge Microsoft Edge

Chrome, Firefox, and Edge must be installed on your machine. Safari is available on macOS without additional installation.

PyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

goose_chase_web-0.1.47-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12Windows x86-64

goose_chase_web-0.1.47-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

goose_chase_web-0.1.47-cp312-cp312-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

goose_chase_web-0.1.47-cp311-cp311-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11Windows x86-64

goose_chase_web-0.1.47-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

goose_chase_web-0.1.47-cp311-cp311-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

goose_chase_web-0.1.47-cp310-cp310-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10Windows x86-64

goose_chase_web-0.1.47-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

goose_chase_web-0.1.47-cp310-cp310-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

goose_chase_web-0.1.47-cp39-cp39-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.47-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

goose_chase_web-0.1.47-cp39-cp39-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file goose_chase_web-0.1.47-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dfed6d1f91ac31488f05e664db47ffe6e73e995c2080e39c6cfb20de74350fa4
MD5 12bba6c8f9d56a3684d1ecb7d09a16fd
BLAKE2b-256 d579d0d5d1796fe8dff694511032f2f9023e7a4eee7513697ba1448ccb2967e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad070d43ddf5eaae7e7425ab522488182c0bb7daf2712611d1a793e3e6198ae5
MD5 e65e5a3704fdc4732cfa11425c90292c
BLAKE2b-256 a6c34346afc352d737c9f79169164e01f7e404c3437ba1cad169f444d5cd73a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ea472abb1a4922fd243d441eabb40266413b01520a49177d3907edaf31ff13e
MD5 83e105e00f44cc5df1df527403f74397
BLAKE2b-256 e7ec991cc4b263f899c5d5e04a37407fd1bc299bace1ccd9db31597a5d1e108f

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 12232472056a7a1d04175884224d1e3d5fe56424f974595fcc4fd69c880aa26a
MD5 54322407ded6e087ac36ef9275169b54
BLAKE2b-256 db50d1b8a3de56592a4ebf080eb0ece18a92d4c475c99395872aa6dc371ea273

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4a025fb7d87a930a7bc1428df8bc25fee36b846319cc93aa7e61421955f82955
MD5 c279aa7afb5e4a015588c4744dccfa99
BLAKE2b-256 6579b36e5891b09dd7b7ee80e3e603828aeb5c2823ba99df8a902b1dd3b5257f

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eac79f5db05d1c82aaeac96a4d3f275a57dfd7a2caac05eff66aae93e0be3cae
MD5 21b584bebaafa7dc0faf67228d602060
BLAKE2b-256 f4f19f8266130baa2a516dafa83c76a8464ce0e302cb919bb186252e48216495

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2b6a8d136a74f8539cf80e3ae1b8833117a620a82ee1d0192445941278481641
MD5 4b29782f3c66cf4b89a83f58aa1634a1
BLAKE2b-256 17aae829937c5640be8037034fe67ddafd81ebc5203a8857b6929caaf99c4372

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e4025a913e6b1891db19f46fc1188636d484328262e2eee3f1dc51f8bfbd0b74
MD5 bca6fba54e3262d761cf6edaf855e525
BLAKE2b-256 8c607e2ffbc755c01e8f175930a80abf5df8083f94cf2754fe326be55dee0fe4

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d1df38e23ba3c3b9ac4ce5add0bf486afe5860e192501ccb0e94e5595835750a
MD5 c80286a5e300dd6a087e4433187c61a8
BLAKE2b-256 70a07e87604ab06c0e10cf52c93fc2790dfa7bf399291888d89aa25ff1f5ed8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ad665200968a504eab4cf8d91713c8f2b4aaac405097cf62b9f55506fe0b646d
MD5 ce9d70e83f94563622c6d0433a02f7fd
BLAKE2b-256 f720178215b69ad54716a7111ae947f148528013c1da7f1fcd9ce22dd21bbb57

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp39-cp39-win_amd64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 704fef1bf689244a2bb05aa89b1846f2eafd34611b6798a5d984bbe2e93ab5a4
MD5 21d53f86bf2718e552ac79a8cb04054e
BLAKE2b-256 5b5ba3d9ec0b91e0d705cdef6c6699764adaf7a03f73340ae488736b1001bced

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goose_chase_web-0.1.47-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.47-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ffb90058d7ea23d4030135f4eddbc625f063878283137ae3cdb372194bf5a94
MD5 358a985b7c22ef0a5ec5637dab47853b
BLAKE2b-256 36ee338a0b54ca9126c95e1841ccf0e3592afa9de49f6a75d913161950098841

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.47-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish.yml on goose-chase-tool/goose-chase-web

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page