-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
Description
We currently only add the driver log to the HTML report if there is a driver instance, however this means we fail to include the logs when there is an issue actually creating the driver instance.
We should move the following lines from _gather_logs:
pytest-selenium/pytest_selenium/pytest_selenium.py
Lines 245 to 249 in 2c40b5c
| if item.config._driver_log and os.path.exists(item.config._driver_log): | |
| if pytest_html is not None: | |
| with io.open(item.config._driver_log, 'r', encoding='utf8') as f: | |
| extra.append(pytest_html.extras.text(f.read(), 'Driver Log')) | |
| summary.append('Driver log: {0}'.format(item.config._driver_log)) |
To outside the if driver is not None in pytest_runtest_makereport:
| if driver is not None: |
This should help with diagnosing issues when staring the driver instance, such as in mozilla/FoxPuppet#115