pytest-splinter icon indicating copy to clipboard operation
pytest-splinter copied to clipboard

how can i get the driver

Open huo2huo opened this issue 2 years ago • 1 comments

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

huo2huo avatar Oct 08 '23 06:10 huo2huo

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"

huo2huo avatar Oct 08 '23 06:10 huo2huo