-
Notifications
You must be signed in to change notification settings - Fork 1.4k
How do we parameterize the tests in SeleniumBase #938
-
Can we use the pytest fixtures to parameterize the tests created using SeleniumBase? Please share if there are any examples for the same.
Beta Was this translation helpful? Give feedback.
All reactions
There are two ways to parameterize SeleniumBase tests:
- With the
parameterized
library. - With
pytest.mark.parametrize
.
Here's an example of using parameterized
: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/parameterized_test.py
Here's an example of using pytest.mark.parametrize
:
https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_pytest_parametrize.py
You'll notice that in order to use pytest.mark.parametrize
, you'll need to use SeleniumBase as a pytest fixture. That's one of the syntax formats of SeleniumBase. (See https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md for the full list of SeleniumBase syntax formats.)
Replies: 1 comment
-
There are two ways to parameterize SeleniumBase tests:
- With the
parameterized
library. - With
pytest.mark.parametrize
.
Here's an example of using parameterized
: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/parameterized_test.py
Here's an example of using pytest.mark.parametrize
:
https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_pytest_parametrize.py
You'll notice that in order to use pytest.mark.parametrize
, you'll need to use SeleniumBase as a pytest fixture. That's one of the syntax formats of SeleniumBase. (See https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md for the full list of SeleniumBase syntax formats.)
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 1