resolve 'There is no context available for qualifier' message
This commit is contained in:
parent
aec59a7e91
commit
7abe140621
1 changed files with 8 additions and 4 deletions
|
@ -71,10 +71,14 @@ public class TestEventsLogger extends RunListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createPageSrcFile(Description d) throws IOException {
|
private void createPageSrcFile(Description d) throws IOException {
|
||||||
|
try {
|
||||||
if (driver != null && driver.getPageSource() != null) {
|
if (driver != null && driver.getPageSource() != null) {
|
||||||
String pageSourceLocation = System.getProperty("page.source.location", "target/failed-tests/page-source/");
|
String pageSourceLocation = System.getProperty("page.source.location", "target/failed-tests/page-source/");
|
||||||
FileUtils.writeStringToFile(new File(pageSourceLocation + d.getTestClass().getSimpleName() + "/" + d.getMethodName() + ".html"),
|
FileUtils.writeStringToFile(new File(pageSourceLocation + d.getTestClass().getSimpleName() + "/" + d.getMethodName() + ".html"),
|
||||||
driver.getPageSource());
|
driver.getPageSource());
|
||||||
}
|
}
|
||||||
|
} catch (IllegalStateException ex) {
|
||||||
|
Logger.getLogger(TestEventsLogger.class).warn(ex.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue