pytest-splinter
pytest-splinter copied to clipboard
how can i get the driver
How can I obtain the driver defined in browser in the conftest.py file, that is, the driver defined in splinter/driver/webdriver/chrome. py
The driver below cannot be obtained
@pytest.hookimpl(trylast=True, hookwrapper=True) def pytest_runtest_makereport(item, call): outcome = yield rep = outcome.getresult() if rep.when == "call" or rep.when == "setup": if hasattr(driver, "get_log"): for entry in driver.get_log("browser"): print(entry) # if entry["level"] == "SERVER": # print(entry["message"]) # assert False, "Error reported in console"