Skip to content

Commit

Permalink
Updated TestNG listener to set iTestResult failure.
Browse files Browse the repository at this point in the history
Updated selenium dependency version.
  • Loading branch information
AutomatedOwl committed Jul 6, 2018
1 parent 29ee3c8 commit a5ea664
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>3.8.1</version>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.8.1</version>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.8.1</version>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
Expand Down
4 changes: 2 additions & 2 deletions testng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.8.1</version>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>3.8.1</version>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public void afterInvocation(IInvokedMethod iInvokedMethod, ITestResult iTestResu
}
else if (isAssertJSErrorsEnabled(
iInvokedMethod) && getJSErrorsFromLogEntries(logEntries).anyMatch(e -> true)) {
JSErrorsDriverHolder.getDriverForTest(iInvokedMethod.getTestMethod().getMethodName()).quit();
throw new WebDriverException(JS_ERRORS_EXCEPTION_STRING);
logger.severe(JS_ERRORS_EXCEPTION_STRING);
iTestResult.setStatus(ITestResult.FAILURE);
}
}
}
Expand Down

0 comments on commit a5ea664

Please sign in to comment.