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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.49-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.49-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.49-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e50147ef9335119f708ecd9afd18e79b2262b1a6700554a62c38d97964ca6fc1
MD5 e688b1d68f0cccea730285f5e06cff65
BLAKE2b-256 2c5fbb97f8ca7c80838ee174267c9a6292d6bbad098eee185c3d78e0adf13f78

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9335c311fb9ea2a12bfe64e5fc4a3c0ebb020dd46b19eadce0e83f921f0ac9e9
MD5 1e7209acef3242fbfa55b4d1ce6361df
BLAKE2b-256 9f7f916299f4288b63804b479e000565513922e02ccd76819814c5c8e6b9c950

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c8117c64bac199238f4d5d0428335870f8ccc68d3e04a1f6cb50675ac7464869
MD5 317b934d7e637bab0d4886dab815316f
BLAKE2b-256 3f231ee670d8368d1a0f5c5e5fa3a0564c0f3e9b7949dcf9d385a2e851cf4201

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5db129ebcf1eed57c8c2f7d27aebc2d0cbafbbcde36c4dc3e97ddcf4dec960ad
MD5 1da9e370c1f6ac7f64c4ccb7be058d5d
BLAKE2b-256 c5754d5c32d9010a98bb819bd2154980fab26e72a98428889e5f131c7f49e247

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0bbcc802c29e77b7dfc4ff9ef2c750dd26dc528f5ea439823658b7e5f87a9abf
MD5 26626e5f6331482ff283187be3548bda
BLAKE2b-256 4f255e077dfedcf0443b27c2fa7df167e4de87e83354b1b713a38ad9b30bc624

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d98cd34dab8526a8ab435c366b6f8adaa44d390489de2eb55298a5ef70681c19
MD5 557ada87e9ee8c75268ae345cf0c8463
BLAKE2b-256 9ea3f5493586a56d230bcf695548b8db75486d88219aa69d8d3f19981da6c196

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 68292e56aba8fe1b5b8cdb88e36f6120129a13ecc92e543b026e74a070f17033
MD5 42c8518409a9270740d23ca75010b791
BLAKE2b-256 c39cfa0f1ec0896e569100a429210ce2602d4a2f9476ede3e86c078828ae783f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7a3607755075250806b3f84ff0fbf1f0eaf41ce0de73bcd07bdd0b9bf8cdbf2b
MD5 628b24aa5f282fdbe4df6bca6371c5e2
BLAKE2b-256 53b71a46f5559a093411c6eb3512c67198ce2d853fe2582de63f4e36be8c552b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0337944916ea88ae24ed65aa69ccc5b2014b442d778db26bda8144463c762f43
MD5 641f4ef7a5c22d33437c348d56879535
BLAKE2b-256 c3a672e677a50b5161fbe7fa43b0d356fb0c7551c3908ee05606d4de6798de46

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5359ba6a1479c309fbdbc0b2cbb5696c29f4334c31b09307d95e2ec302fdff65
MD5 e1264d698f97e11cdce410be10545252
BLAKE2b-256 71086704e47453ac608144b1df525a395c1d3befe57f77f2dab2694662bd83c8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9fe89ffe835db08873c2b01b8b51864f3ad6232d5b1173b5dcc0410b95c616d
MD5 026162bd59570dfd78cf31ac367af65d
BLAKE2b-256 7c16e0921550adf2534697f66c7d875f6a3d6d84368e705de4683a5ecc84f44c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.49-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f184f07055c14c529237896de02ddd875e3c19f9a0ab9d5918beec6b7b6532e4
MD5 6291192f33cd4e6eb4c4ad68626b1769
BLAKE2b-256 820137422e6c9eb5a78d353c3d2b52c9d103e5702f210876839061383f85584c

See more details on using hashes here.

Provenance

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