You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the following code in my test script to catch and display any step failures:
log.info("\n\n******************************\n"
+ "Error Infomation \n" + "Method Name - {} \n"
+ "Test Case Number - {} \n******************************",
result.getQualifiedMethodName(), result.getTitle());
log.info("Error type : {}", result.getTestFailureErrorType());
log.info("First Step with error message : {}", result.firstStepWithErrorMessage());
log.info("Failing step : {}", result.getFailingStep());
log.info("Test Failure message : {}", result.getTestFailureSummary());
It correctly displays step names and errors but occassionally I get the step name as optional.empty instead as shown below. Is there a reason why the step name is not getting displayed for certain steps?
******************************
Error Infomation
Method Name - Test015
Test Case Number - TP397-132
******************************
[INFO ] 2021-08-30 10:51:46 framework.Listeners.ExecutionListener 72 testFinished - Error type : org.openqa.selenium.NoSuchElementException
[INFO ] 2021-08-30 10:51:46 framework.Listeners.ExecutionListener 73 testFinished - First Step with error message : Optional.empty
[INFO ] 2021-08-30 10:51:46 framework.Listeners.ExecutionListener 74 testFinished - Failing step : Optional.empty
[INFO ] 2021-08-30 10:51:46 framework.Listeners.ExecutionListener 75 testFinished - Test Failure message : ERROR;org.openqa.selenium.NoSuchElementException;Timed out after 2 seconds. Element not found
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'NALU-PF2JP03M', ip: '192.168.137.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_261'
Driver info: driver.version: unknown;PulseWidthControls.java
[INFO ] 2021-08-30 10:51:46 framework.Listeners.ExecutionListener 85 testFinished -
The text was updated successfully, but these errors were encountered:
I seem to be getting one though as NoElementException. Isn't that a Selenium failure message? The problem seems to be where the step name is not being displayed.
I am using the following code in my test script to catch and display any step failures:
It correctly displays step names and errors but occassionally I get the step name as optional.empty instead as shown below. Is there a reason why the step name is not getting displayed for certain steps?
The text was updated successfully, but these errors were encountered: