pytest-bdd
pytest-bdd copied to clipboard
need to pass variable to pytest_bdd_step_error hook, is it possible?
trafficstars
Hi,
I'm developing, using pytest_bdd and selenium, some tests on a web application, what I would like to do is that, on step failure, current instance of driver (implemented by Firefox) gets closed before next test, so I would like to know if there is a way I can pass the driver object to pytest_bdd_step_error hook, so I can call driver.quit() or if across default arguments I can retrieve it.
I don't know if I am using right method to accomplish this, please also tell me if there is a way also not using hooks.
Best regards, magowiz