Skip to main content

Vigilant Kit

CI

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

Install Vigilant Kit and make sure Chrome is available on your machine. Selenium Manager will resolve the matching driver automatically.

pip install vigilant-kit

Create smoke_test.py:

from vigilant.driver import Config
from vigilant.driver.vigilant_driver import VigilantDriver


config = Config(
    selenium_browser="chrome",
    selenium_host="local",
    base_url="https://example.com",
)

browser = VigilantDriver(config=config)
try:
    browser.get_page("/")
    browser.assertions.see_in_title("Example Domain")
    print(browser.get_page_title())
finally:
    browser.quit()

Run it as a regular Python script:

python smoke_test.py

The browser opens https://example.com, verifies its title, prints Example Domain, and closes even if the assertion fails. The same VigilantDriver object can be used from pytest, unittest, behave, or another runner.

What's 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_element()
  • 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

Python 3.10 or newer is required.

Configuration can be supplied through environment variables or an instance-scoped typed object:

from vigilant.driver.config import Config
from vigilant.driver.vigilant_driver import VigilantDriver

browser = VigilantDriver(config=Config.from_yaml("vgl.yaml"))

Docs

Configuration

Examples & tutorials

Actions

Development

Run the unit suite without starting a browser:

PYTHONPATH=src python -m unittest discover -s tests -v

Metadata

Release files for vigilant-kit 1.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vigilant-kit 1.7.1
File Size Uploaded
vigilant_kit-1.7.1.tar.gz 42.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vigilant-kit 1.7.1
File Interpreter ABI Platform
vigilant_kit-1.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 74.5 kB

Release files / vigilant_kit-1.7.1.tar.gz

Download URL vigilant_kit-1.7.1.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e44a1c3905e8b26b592e3b09b7698eca7ba8f86fc399aa963c7918c0d3fdf4db
BLAKE2b-256 checksum
How to use checksums
fb1c6292568646a66306da9a72cbb243257d1773bb3a1e2e0771c035b6a0e7ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / vigilant_kit-1.7.1-py3-none-any.whl

Download URL vigilant_kit-1.7.1-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
325b4c05386376eb7364236110da9c5fb6c5ced79d0ce816bdb26f58ef662f06
BLAKE2b-256 checksum
How to use checksums
d1f7636be1bea39f8db97496ef95a4b45bedc2dd6a9373fe48c585feae3b1cb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

1.7.2

2 release files

This release

1.7.1 This release

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page