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