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:
|
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:
This should help with diagnosing issues when staring the driver instance, such as in mozilla/FoxPuppet#115
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
To outside the
if driver is not Noneinpytest_runtest_makereport:pytest-selenium/pytest_selenium/pytest_selenium.py
Line 186 in 2c40b5c
This should help with diagnosing issues when staring the driver instance, such as in mozilla/FoxPuppet#115