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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.45-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.45-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.45-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ecc1bc20fdd15b3804b9912e64ad34f11ef1c2fe59a4c5b5197c76a0641ad971
MD5 d113cbbf70d178e17f42abdb9e14f3d2
BLAKE2b-256 26f5a6df8e07447279b24f5d45db26965ad7ce8040039ade8c3b4bbfdc34a5bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7546474972116f3c86817b0beaa0e62413f0eb61d8118e1a6bfb9655ed02ce8f
MD5 57415b496ab2702e7cdb9aceaed36c80
BLAKE2b-256 62089c1a5e3b037d01602e4f55d03fdc1e405eed7ad3f3c2523d5b73f8b95742

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd9f0543f0b31b8e49fc467cb85189de7c6ac7390c33ff009fb1e431529f00b4
MD5 ea1b4bac2722dd811c9624cc7134535f
BLAKE2b-256 2b9acbfd2f90b32572eb5428f9649341dd0f35d789532f3fa4d057df3a2036d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 59dc6ab54d3dea3b0e9b5735813514d9531184911868bba29f559fca8c23fe1f
MD5 bd2191a7dbd1a4ab3fc1303b44aae41c
BLAKE2b-256 4ebc23eb2fe2163efb4ad4c8a44dcd544d93694fa99172a0909124e6360e978d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a9e5f29c8df8bcb0f449e4c8335b0c54c67efcec4c05890fdb61d9b890e98416
MD5 10c32d1198941d70f7c235b423de491b
BLAKE2b-256 bc9a080cdb16192212b8efb891286a0373ef8b4a620218333a3648253af05599

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1bab0d4eb9cefa2e012d055247157a6096e24c3912665e052c0abc8c99fdefb
MD5 d2345172ce511df07f3470201197f4a5
BLAKE2b-256 8426fa282dc07b4ce17b91202b71847a976cfdd4e28bcbefe277acd685cabdff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0bcc77db7c4d24c8e8fd6b2b976f9b13553a30dd2a3f475c32020cc6500ed2ee
MD5 bb4707389f306f556a2532bde4eb98d6
BLAKE2b-256 1457ca78baba8d35d1a217dec4f058251175eda8a2806f7c7925ab59bdd2bcc5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 95e7de3282e18755f48853a8cabd08e3224a82558edbefecc2c57019ba7edc8d
MD5 1998e3daf7b67e0bc33928c3e67e037c
BLAKE2b-256 55fc4b2cac55c71a3b2004073bf846398421ba67dd194054adc687c19aa1ab73

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3e2254c00e9ead97856bfd999843020ffa0450a4c0156c94519a0ce67568d7c
MD5 031b7da3f8a2fb59f713775b733aa6ee
BLAKE2b-256 58aec8cbad7675523596461b9464b0bd1cedfca0de21b7d31087666217629f8e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5e13e170be7de8be06c7a3826583b7767eeffa0ce05b5de38f4d7ea5d864f937
MD5 605de3fc2f22e838707471c4f35db212
BLAKE2b-256 b46a1b42dff5cf4a56789b086dbeba30ff34c84d7bf5d05c24b4d110628488a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8db8aff380c6927027641b2af58554bd829da935fc6c6efa09a2718a91d620d
MD5 8a7a6fc0e529df66eb65236f878459be
BLAKE2b-256 98e7c5ba4a9b6fd389ff233fde211abddc1dfe2d8fd22bf2c9e67bdb763628ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.45-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76e2bf8fd2d2e6462458992bcbdab53522dc6cb3f8ec142f23f1ecfb22857064
MD5 38c2855c98a018989d15dbeff86b4d91
BLAKE2b-256 89c96bc6f59562d0a29a4f640e4c7c4b188fdc728e3012004623ef37c1f8ef15

See more details on using hashes here.

Provenance

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