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.48-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12Windows x86-64

goose_chase_web-0.1.48-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.48-cp312-cp312-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

goose_chase_web-0.1.48-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.48-cp311-cp311-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

goose_chase_web-0.1.48-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.48-cp310-cp310-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.48-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.48-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.48-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 38ac10f4d9ebd2557c680519e2c7743b92a191e4121cb5071907d288eab3edfc
MD5 48fac73ba7c3049bf4a51fe9b9d79598
BLAKE2b-256 985bdba15d3edddd16000016040711b82c66612f858ce6c85ad0c501b53dfbd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5fe763522d7dc0cccf069114a64c15af561e8a7f007c9225fabffe5ed3b9498
MD5 3a4ab1a91cfa9e6910870680bfe3ef69
BLAKE2b-256 4c7228668ad7b3e5bddc98fb893023c7b5c357573119322a064859a61136f730

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 61696000b45dfcb25d31fc92c28a659efcce8c76a025f3f78c20ade8c8754ba5
MD5 925d7d144b23b8e092376614c8f1ced9
BLAKE2b-256 bba11232e458df8b3357a4cb68af527fd8ce724e20fbaab5e3f16efe27c9bf1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 551475e2c1c7f2a038288104203958d452cffff154880960b9d910db735693ec
MD5 8999a3029c2ce56d4c38961ec19dd6fc
BLAKE2b-256 0f05466303c0acf9c62cb0e1ee75f4c2ca6433c8d2d79dec072d24050af6db06

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4abe0f0533e5aa0ef4906a7b750c86044cc6beb0e679e8ca787b5a54427077ee
MD5 8c5fa18e4be22f73a2e91610de91c402
BLAKE2b-256 4c57739a21b1ffc0a87e84842c71ad40ad33ab79b7d81178e921ae3736ca2942

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5131f482e3b2b1bf7a3b2ca6ed1ca14284866848ccadb7646b4c79b469255ec1
MD5 2f165e1acaf58096069223b0edc8ff68
BLAKE2b-256 9e3c21fc1e56e5fc12741f7dec9dc234b9ef374587860fc6a4090dd542202b9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9883d7754e52394b0845add88ad80ec0c0eb9e8676eca7deb15724978ecce4d2
MD5 18b8524f44cc4582801c8c6246e8747e
BLAKE2b-256 f97d247d6310f3a253a31701a7574dffa701378a3d13cf3cc4b6caed3a8c3fc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c7a220df780716aa155e50b2c9db37029b33b804a087c67c1c71153dba398f2
MD5 81653c5f25e924e551f60e56597c7818
BLAKE2b-256 ca8b3fae9fb54261c96099e4841eb7f9382a38eff20be8dc4ba1b0cae9a0fe5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 393697a5df7ab0775631421c36071d64181da996850d3cdeabdcfeb6c5e32fc3
MD5 9d3974a5d7f738e5cf939e8f5f927de1
BLAKE2b-256 83a52beb87356a5d4d6e6df6e10570db6d9806ae35a24aa6e00f73f1cbe3a175

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6ca01b42a73ec149c295c14f26a70d00c67aad2597b7adb3fd8ac8b0e219d1d3
MD5 26520d0a2d26bb0c5a843fd69de48bd6
BLAKE2b-256 6a45e061fc295525375da984b7ffc376c2a1072f8a44bf55b08c0bebcbc79286

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc5fb995291d5bfe0848259eb4bb90ce7c0298f1ae049c72a885807cf870be14
MD5 6b2a3dc3a8d18ee56a5bb324651bfb29
BLAKE2b-256 9307d84cb9f865c0a46841c6ca95e63376aee783896f5a8f0d7ba4f0bc0946fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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.48-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.48-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27b5efdfc0f434b527b5100ba362033151958cfcd77d603a99dd72e939ed8411
MD5 d3802a1e6e00bfc00fca2a0c9d5e7e40
BLAKE2b-256 780e531b336e5b43f821c33fe0c1fc8c3ed348d0f6304bd9e685a538dc0f1b51

See more details on using hashes here.

Provenance

The following attestation bundles were made for goose_chase_web-0.1.48-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