Answer the question
In order to leave comments, you need to log in
How to properly run parametrized pytest + selenium?
Hey! Tell me please, how can I run a parameterized pytest test using the selenium driver?
What do I have:
@pytest.fixture(scope="function")
def driver(request):
driver = webdriver.Chrome()
request.addfinalizer(driver.quit)
return driver
data = [{1: 2}, {2: 3}]
@pytest.mark.parametrize('number1', 'number2', data)
def test_01(driver, number1, number2):
pass
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question