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
- Vigilant configuration
- Adding custom browser options
- Using native selenium methods
- BiDi helpers (console/network)
Examples & tutorials
- Quick start example using
unittestlibrary - Quick start example using
pytest - Testing ecommerce project using
vigilant-kitandpytest
Actions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be0c84128faf3d2ebb1b02dcc2d66e7b066978ddec4808529dc411bfc9fb33e8
|
|
| MD5 |
953cce8e67d55d0dcea80b644c2c0835
|
|
| BLAKE2b-256 |
9ed8192eefcd83e95e6f4268a75067902a9ac0d5a1e5cd1df9775918816f4994
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b37d2a345c8ffc8a8ecdb981315128b2642b6aa0d77ccf6d02823082b03a7410
|
|
| MD5 |
012c49a264ddea458ce02078370e3fd2
|
|
| BLAKE2b-256 |
3f34d883e6f9893adb656a220470b703b4cb097e7325daca71b1f01a84a9dbf4
|