selenium: prevent webdriverio automatic screenshot
When the wdio configuration has screenshotPath, when a test fail a
screenshot is automatically taken. However there is no support to
specify a filename, we thus went with our own handler in afterTest hook
to have the screenshot names after the full test name.
As a result we had two screenshots taken:
A) CHROME-Error-xxx.png
B) Suite-Sometest.png
Set screenshotPath to null which disable the automatic screenshoting.
Adjust rest of code to use logPath as a base path to save screenshots.
As a side effect, it works around a nasty race condition in the
reporting. The report is generated while some test still has an
afterTest hook running. The report fail to generate and cause nodejs to
exit. The exact fix still has to be figured out though. T216818.
Bug: T216818
Change-Id: I4b53c98bd4de0d9ff850bb883ba899dd1dce0274