How it Works
How it works:
At the core, SeleniumBase works by extending pytest as a direct plugin. SeleniumBase automatically spins up web browsers for tests, and then gives those tests access to the SeleniumBase libraries through the BaseCase class. Tests are also given access to SeleniumBase command-line arguments and SeleniumBase methods, which provide additional functionality.
(NOTE: pytest uses a feature called test discovery to automatically find and run Python methods that start with "
test_" from the file that you specified on the command line.)
To use SeleniumBase calls you need the following:
from seleniumbase import BaseCase
And then have your test classes inherit BaseCase:
(See the example test, my_first_test.py, for reference.)