Skip to main content

Library that makes functional testing with Selenium WebDriver fast and easy.

Project description

Vigilant Kit

Minimal Selenium helpers that stay out of your way. Use any test runner (pytest, unittest, behave, raw scripts), keep full WebDriver control, and get convenience actions/assertions without a framework telling you how to structure tests.

Why Vigilant?

  • Minimal & composable: Thin wrapper over Selenium; mix our helpers with native WebDriver any time.
  • Framework-agnostic: Works with pytest, unittest, behave, custom runners, or plain scripts.
  • Quick wins: Smart waits, handy finders, assertions, PDF helpers, and data savers ready to use.
  • Customizable: Bring your own browser options, config via env or YAML, extend actions/assertions as needed.
  • Standards-based: Built on Selenium WebDriver (W3C).

Quick start

pip install vigilant-kit
export SELENIUM_BROWSER=chrome SELENIUM_HOST=local BASE_URL=https://example.com
from vigilant.driver.vigilant_driver import VigilantDriver

def test_login():
    browser = VigilantDriver()
    browser.get_page("/login") \
           .fill_form({"#email": "user@example.com", "#password": "secret"}) \
           .click("#submit")
    browser.assertions.see_text("Welcome")
    browser.quit()

Use your runner of choice: pytest, unittest, behave, or a simple Python script.

What included?

Wait, Act, Assert

Actions

  • click()
  • scroll_to()
  • fill_form()
  • switch_to_window()
  • ...

Waiters for condition

  • wait_for_element_to_be_visible()
  • wait_for_element_to_be_clickable()
  • wait_for_text_to_be_present_in_element()
  • wait_for_element_to_disappear()
  • ...

Assertions

  • see()
  • dont_see()
  • see_text()
  • see_in_title()
  • ...

Scrappers

Minimal required methods for scraping some data:

  • get_text_from_element()
  • get_attribute_from_element()
  • get_cookie()
  • save_data_to_txt()

Test PDF

You're testing some eCommerce project, and you need to check your PDF invoice file? No problem!

  • find_pdf_file(),
  • assert_strings_in_pdf(),
  • assert_strings_not_in_pdf(),
  • find_file_and_assert_strings_are_in(),
  • ...

And much more! Check list of all available - Actions

Extending Functionality

If you need something that is not covered in this library, you still have access to all native Selenium WebDriver methods. You can create your own methods or use native WebDriver methods and share them on one browser session.

Install

pip install vigilant-kit

Docs

Configuration

Examples & tutorials

Actions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vigilant_kit-1.6.0.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vigilant_kit-1.6.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file vigilant_kit-1.6.0.tar.gz.

File metadata

  • Download URL: vigilant_kit-1.6.0.tar.gz
  • Upload date:
  • Size: 41.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for vigilant_kit-1.6.0.tar.gz
Algorithm Hash digest
SHA256 be0c84128faf3d2ebb1b02dcc2d66e7b066978ddec4808529dc411bfc9fb33e8
MD5 953cce8e67d55d0dcea80b644c2c0835
BLAKE2b-256 9ed8192eefcd83e95e6f4268a75067902a9ac0d5a1e5cd1df9775918816f4994

See more details on using hashes here.

File details

Details for the file vigilant_kit-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: vigilant_kit-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for vigilant_kit-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b37d2a345c8ffc8a8ecdb981315128b2642b6aa0d77ccf6d02823082b03a7410
MD5 012c49a264ddea458ce02078370e3fd2
BLAKE2b-256 3f34d883e6f9893adb656a220470b703b4cb097e7325daca71b1f01a84a9dbf4

See more details on using hashes here.

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