Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i get the driver #177

Open
huo2huo opened this issue Oct 8, 2023 · 1 comment
Open

how can i get the driver #177

huo2huo opened this issue Oct 8, 2023 · 1 comment

Comments

@huo2huo
Copy link

huo2huo commented Oct 8, 2023

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
Copy link
Author

huo2huo commented Oct 8, 2023

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant