❌pys
A single instance of Pylenium for an entire Test Session
Usage
The pys
fixture is used if you want a single instance of Pylenium that is shared across all tests within a Test Session.
Using py is the recommended way of working with Pylenium. Sharing data and states across tests is a bad practice. For example, you cannot run tests in parallel in this mode.
Import Pylenium
and add the type hint to your tests (as shown above) so you get intellisense and autocomplete when writing tests 💪
Arguments
none
Yields
Pylenium - an instance of Pylenium driver that interacts with the web
pys_config
When using pys
, an instance of PyleniumConfig is also created and can be managed for the test session. You can access pys_config
as a fixture or directly from pys.config
Access by Fixture
Access Directly (recommended)
Recommended because it's fewer lines of code and you already have access via Pylenium
Last updated