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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

goose_chase_web-0.1.52-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.52-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.52-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7edc17adde01fc68b81031cf7d98ee4b57847973f17d5da1f0dfc26dcbb72321
MD5 d06770a2683ac7ffb1c3054b726551fc
BLAKE2b-256 da998c1795a3228d1e19659bbf42068e9dbde288bd8cee2c6c719ec5426d9ed1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56c7ddf317647e455540c012e25a1f4b989ed4b329dd105929dcfc66e8481010
MD5 8ecba82c7441c407b196278c3c16a7c2
BLAKE2b-256 4eaf510523410cd8ea6ef745d2f9194e9c4a4595a50ab80199e4bbefd512b0fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f70534846ee5aa55397ed75076f9f7b008457d28a63d745c8fa7962be75d903
MD5 58d968f9de245f239f9cc48d31a799b7
BLAKE2b-256 2f351f9313b3bc1538c31698a3947b05ac8b57f1a6f91dc9390fd636c20df9f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8167600b5c9678c5dbb92f66a9edf77018e635bc1c8a22fa2bf24229e2d47ed2
MD5 81410a984509538c7d1ccb2fa3747b2b
BLAKE2b-256 ade0e0124b938cf83df106a3e51ec2f05130e9cd8fe8c265f2af54d161f1e830

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6eb4b14ee0bf59ac8b615bf55aeb6aed8e42ed51367150782d9bec1a18bdcc15
MD5 6e6fa3fd85afa3937e40f8c4ea8ba81e
BLAKE2b-256 7596779f9b3e0fab205102b74028e55532a6de1a30fb2bd5f74efa5d248d45c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8a21bac35575d1fbf98f2bf0a8badea6d1fefad953874ebdecb418e048d57f12
MD5 300f40978dd123b991f1e669d99aeceb
BLAKE2b-256 9a447c60e8bd18abbfc05b36ad6d257bfbc3429da14e8a61f57aad250987dc59

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4dc6ecaae0390cfe74ceea093719bcd9298a5ce4a8e588359c184b7a68669b87
MD5 315ce1b3ecf125fc608b60bab5a32414
BLAKE2b-256 16b7c7643e03116165bb6f6fc2a1f100cd01715ee007ef8815ab360d15856ea6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8171741c14ed96f1fcb5f866775e3d1cf5fde8c4cae1daaa2acd9c3869fd2252
MD5 9e334c5d511f14d94bef9d726fd1ff8a
BLAKE2b-256 dbcae1330c6975007ce1f47547ed65294aea31e8c425d20a005303216fcb70a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af12273ee0c7da8f13f6919ee5d75b98d1d97ac8d56ce86aedba2f8f636aec4c
MD5 6c8b9cc1217270a4f642f75a243f4d99
BLAKE2b-256 835aa021b707566c1366f3f03c8ffd96885753e1337e50ea13b25cfdabf9e2b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4fc8f3befa0a1b4a2da24f9750b0b92afa3c9c5aaa6c95560e2ff9344f529ae6
MD5 4c35148f155d1f17ae64fee50210cefd
BLAKE2b-256 f3fa87501f6f19c3bd926d3096546e471f54764462c3bd6de825045c2665b1b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef4e408ecb053244fd1d6427afbbc171731999bf31bf41947994a7ca4b78e54c
MD5 df3ac79ff902cf0302aeb66a23142937
BLAKE2b-256 a9261792001d41da102a529decf235eb668c073d1e1061fc1d92bfdb67e1791e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for goose_chase_web-0.1.52-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e052dbf234cddc1d2e0a0efe160baea1536b5028b5d47408d9943362db8d7956
MD5 1f28f488ec6f79023d4d67a987712ea0
BLAKE2b-256 8dc77ba2c5a22607930dd670a6d9e72a0c4403b673cec817eca3ef5240d45e9e

See more details on using hashes here.

Provenance

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