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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.50-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.50-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.50-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d4a49aa1eb59ff50e3873ae381f9c96a7e5de9180e9b84d8754c5f0b9ddb6fb8
MD5 8ed5f468858cf5a960bcaefd55b4e774
BLAKE2b-256 1b727f61968b903065548156191b72c1954eafe308a43ae7fdf2939071b166eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6ccba118de6a510654c63753e845c0e53cc7c6a8e33e945d010c53d789fa78e
MD5 6267a2db56d9e2697e38a8ad1341f1bc
BLAKE2b-256 32cd15dcdab3318182efe92c57a9b84b2dd25c8acdbe063f09c2898fea6295ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4349f730f94a52348914763c35a8f50d076a42cc576194889cd20cd47de4a349
MD5 9d11ad36099932af91299fa7f6e06a5f
BLAKE2b-256 082c5668c9430a071251d169cb78ae569eb169e1807e511c09e3ac362973392f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f229863fbb0a25b39aff1265313d3c278937daba29b3234672946b378ea09fa3
MD5 1523ebee244c286cf81a8664b8a21741
BLAKE2b-256 5b0e30012fb0301ffddb968a1ad11c96a83245b3e6907bf4a47fc19477cf9d89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c7f550dce09ee6a63e6d4f6968a610b93a1a237e5d881d871a2b518eb7f276f
MD5 8a87dc7ca3f74e6f2a96c8c4afd4c51d
BLAKE2b-256 e1c95a6e27b31de204c31acae6d5a7e055731fe184e3ff7f47779926c211fc5f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3d20e2d53308c9f732c9e476b0f49a40244244aa07a9ca64b6f020bf5468c6ab
MD5 7f774ee56cb4c47a8167b7251d83ac30
BLAKE2b-256 5d2345d630c4dbc3b03ef36055a1bc45074034e42b50f65a5a3f1900d3d170cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3556a7317edbeb4e305e09e091629c2c7a09048540d9330f2d1d388d111a03ec
MD5 80832984d1a2c423a9519ef13fa6364a
BLAKE2b-256 f1146aaaa7cf031d472fbbea57ae082dde46f91164fb8f947ac34e9968c75e7d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6908a0261fd6b6d1f8edf4529313cbe11c65bf68a2a2d83893a6191eaaa27da3
MD5 b5e8cbf9bdc7deae11521a102957b8e2
BLAKE2b-256 3788e5a18e6569acad04639f23778932bbe99a60fe66798bb518f0791068c490

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e257f76f3c93c13746a4f8a46ac7cd252d042cb9bb4e2d9f4bb9d7aa477bc734
MD5 fc9b9a85a0b73018fe71c0770f817d9c
BLAKE2b-256 cd34f69cc9c5c8fd0f5a8ddbafce8d87c6c6db50cb868fe54cba4059576fe90d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6f743ce76b2a396fb3f1c83ed8d5343bc6c2ac6c17c837320a799b3c306e9c0a
MD5 113480ed9bd62117d004e9e30abff354
BLAKE2b-256 b170ede04b2e58b8d161e6833cc278b18e1d18411c07ba86b165f00a1f247ac3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42ea8de21233ac492024134d68f1276f76cb751958262e3389b3834ecddb9bff
MD5 256e8bc3254a5398faab3fe16e417416
BLAKE2b-256 4d3c4a796471e0303bc7c358eec89b256f1b49aad96f18df409dfaf4c248a3cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.50-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 854aa10b344b01b2ffd379e6f58448093bed58d972be9b1d341d229007ff918e
MD5 8278a5f8f23225ac9f82c6019d25b18e
BLAKE2b-256 f70c13497004f2d246b1dcb8d5739a0918211e49e0892f97846ee0096173c32a

See more details on using hashes here.

Provenance

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