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

Run the optional Chrome regression tests against self-contained local pages (Chrome and a matching driver required):

VIGILANT_BROWSER_TESTS=1 PYTHONPATH=src python -m unittest discover -s tests -p test_browser.py -v

Metadata

Release files for vigilant-kit 1.7.2

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.2
File Size Uploaded
vigilant_kit-1.7.2.tar.gz 47.5 kB Details

Built distribution (wheel)

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

Total release size: 79.4 kB

Release files / vigilant_kit-1.7.2.tar.gz

Download URL vigilant_kit-1.7.2.tar.gz
Size 47.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8e29d6e20d49b71e9881a63d39d639f5346bfee324e707bd1630a0bb61491a45
BLAKE2b-256 checksum
How to use checksums
c026cc348b2f3a4ed174cb48bcacebad6a69a0d7e8a926aa6bf3e80f462758a3
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.2-py3-none-any.whl

Download URL vigilant_kit-1.7.2-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a592ef7366182efd2666ade69e5bbb0b6b241b0079dbb66d604dfd19d5cd2b40
BLAKE2b-256 checksum
How to use checksums
2310f3266c258f1f99aae71d5fb805ffad0bfa7212d8aecd628d8c70869a5cfa
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

This release

1.7.2 This release

2 release files

1.7.1

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