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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.46-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.46-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.46-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ef2e1a10c7da5c92b52318005949e5585ad7bbfe0a9d9458821cd70676d441ac
MD5 2e96bdf1d67ebdc04d355272a23d0242
BLAKE2b-256 d6b3572b87ca59f58aed56f61f11aa811dca7521f19776f4369e536058c8c613

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c3a4f95c447236e4a550946347e17d895cd051a9d346b582346bad14b54bc7ae
MD5 ff13f0fde9632f52837b34eb295c736c
BLAKE2b-256 5a0c4b7fbf2f8c380a5ae38bf8e780650259f2339aff555e312647f3e3778f73

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 afbbd4e57ede7eaaecd3e71352cbd11e8f481bec6902f8ad8fb8122a32b4cad8
MD5 0f4440964f63c3288f6964a567c2097f
BLAKE2b-256 25fcf036e445536b62c26df67f0103d159ac92c48aae22c9ee0320c726f85164

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 71f4c68c328bc53d5b22fdd1e5e7221f38669d4027d50f6c343bb9efa3b31495
MD5 1f2b22940e5cb9b68646dc83fc62bde2
BLAKE2b-256 03243bf1bd606ca49a24d3f7429cf4ec08b8db4d1a812f9a1e77bb6020949a6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ac0558279f7d03490459aaf01b89988dc4822f5e0ac54a423f3a21e25c0bca44
MD5 3d4071389d2dbc0e91d8b988d47eff5f
BLAKE2b-256 bfcd212b63c19e32f30b6d1ce40964a087dac434410b029e83bebf013e418685

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93eb3385e1228c4e2344cb2590b08565875d3566af37286fe7e45b460777b705
MD5 495c032bb35e59ae785674a4709bfacc
BLAKE2b-256 a2a0ca7d4a1f68aef0b090a3aa17520d81698a958b104a6c6d9543ca5305422a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 05b913b419ad499b1fe466cbd790497fd0fac344f5b3be9112dd7bf3ee582859
MD5 f7c0a750b4af5491ceff19a2d7e683b7
BLAKE2b-256 7e9edbeedd609e63b471003c933b6c8ec4e4a095b6806366a6a9ba096164b802

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5695bce6aac016a317be7e3e29e782fcc13a67118fced03d8ccb6d7f392be8fe
MD5 7182b093f0c2938a76741cd87cc96188
BLAKE2b-256 c4da45382a84d6a0907ed5962f9065781ad2049d29ac604fb28ecd17355c75bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa26584155f9534731bcb38546fe22438fb2eea1298af5eea8117b9a4b5891a4
MD5 094efe8c0ec9818a8f070ca37d28983b
BLAKE2b-256 f77ac8e6d645040b0d43bdb91101799e3cc0573730680aafde783abf21a7e26b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b63f6fa9c26b6ef9c69cc42d896c5b4c82691d62f82a0ed5db06a058d51e77b4
MD5 ba07260d6283039be41060d1e840c283
BLAKE2b-256 ade22f127c883e138fbccbfe75ff42dbb05dac88f27c30a637564fd3e6fafc12

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 97e317620146cf764d1e2aa54c261424796e1a11daae5a8633a8c460c53fd227
MD5 3494b6a955bf60e9248984d610922379
BLAKE2b-256 3e7014480d89f7711abc7578d53cc1be61b25a8203fff96b1ec4c95b8a033925

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.46-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6185e9c2fb4246fcac2f6c17468c081c9a7a6f78905bb4bb6aac6f31777b72c
MD5 46729d7dc8caeb372954c4fa46b1df07
BLAKE2b-256 66cfa93f3658b87e6b1bbce16ba5180ab9037b5e2e162fd05716b27f3d653805

See more details on using hashes here.

Provenance

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