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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

goose_chase_web-0.1.51-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.51-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.51-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.51-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a55e1a6991d3682cd05be389d059c47ec5e83681d1ef09afbd172757205832cc
MD5 2df7296fe853173844186543a0751541
BLAKE2b-256 dc7a14dffd011d0a67abbe3bde96245a8062f1a18dba62461a8bae6a41f0fd7b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 88ba01b5452ea069c4d9abbdf812224bca464ba0b538ddaa783819e8895c1944
MD5 7f5fd303fe14f60b729bb6c6262b5d7b
BLAKE2b-256 a0daa23b0b27e9bffa372cd39affd42085bc9bda932e3deff737bbb067e47ee7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e804b6a47e636bed01df458fbee1720a208533ce1087f9a4cb5d6eb8b413e5d4
MD5 cfca4767fa6137b2e61727340365d793
BLAKE2b-256 ef3d9cfbaf2d331afbf4e37796a9afe9f8c95fc56ed0ec6d2ac25b6ec14ae8ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5ceb2e9770258e04283b8e03e45a47059924d0bc7e277ee1cb28ae02d9201c38
MD5 69d1a890c5d896ff1d53e90d87d3437a
BLAKE2b-256 af7451ce296c2212e4b4e04705ba73d54095a3c5eef5262c23ddb9c1e64a41fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44ebe4520635667f8724bcc96db60c61c2147a363420e104d27f9b56b184ebf6
MD5 6917d13d3f43b61f1639ef474091a166
BLAKE2b-256 81e8e37347ce046e284a58af61770b9cb7d620a1acb0eacbdd01d87e7e06c633

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70d366cb093e88f7768850f5d04151731e6200d57aacf7ca5f84941feb013bb9
MD5 df0487f389eca8d3c623fe719b631853
BLAKE2b-256 c1b36038893eade365f77b63c729bf3b5bb0594d5b7b3da7a5910aaf6c596fa8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 132580a44f8e50cd62d7cb3065686e1684c5476e3f078d40675d18c76a99850f
MD5 e7e4afeab216ff8bb7eeee34ee078e81
BLAKE2b-256 d786fc13c548ce6170bd84fb459456d1d91ef9afd19a3b98b60e5bc7199616a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26ae41323d3f68e7bf51d8849b42b0d5ed6f62dc7fee2542dd6937d982a23c28
MD5 6bfb206d75ab7c7e5d5bf0612ce04d57
BLAKE2b-256 fe9ea468766275af36cc91f1545c4f37efdb5209970ba1e044677ffb9284717a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 33a6e84258d7e980f2292de934ea81456d04d66196bfc696a536ea4eef29ac15
MD5 1a5d8e5df1451f9ce53a6d75081acdf5
BLAKE2b-256 a3d595cf3086c7127d118115167b87e29f1f23b27d26f4047c3b8b1498f27c1b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ca3dc4018682d3edd2af71edc549aae065fe34093a9e9cd8f257fdb6b6d8ee08
MD5 33541fe487671fe033f9fbb407d1674f
BLAKE2b-256 cf2ecd22a84db2e64e3395559ecceb14ddfb1df20a75272947c84661b1533f3b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a90ed0038fa562e6e6e3211ea40e84b070fc8dbefa548118e0355c05cdcd1cb2
MD5 63e2e52d7edf65e2f8c231fa2850db78
BLAKE2b-256 e623daf6d8b12951a9820bd771a83276cb06634fb7f45bdeb6e74252c842e42c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.51-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f29602dbe5b900c5101184874cf06b782466744ebd57ba7b7eecfba7cc92710c
MD5 edeef26f65d36ae286ee514efe2b0907
BLAKE2b-256 f160358f7d0499ebed51bc9d4a83e811bdd8b0aee0b3febfe667ed96d28ac40c

See more details on using hashes here.

Provenance

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