Reputation: 191
I use Selenium with TestNG.
I got following exception, when trying to get a element using Assert.fail();
The need is, I want to get the full stack frames. In the exception the removed stack frames ("Removed 24 stack frames") printed at the bottom of the exception. But I want to print all the stack frames in the report.
java.lang.AssertionError: Elements[id, newDocName] was Not Visible
after waiting for 1 Minute
at processor.WebdriverActions.writeFailure(WebdriverActions.java:2213)
at
processor.WebdriverActions.waitForElementVisible(WebdriverActions.java:1015)
at
testcases.NewUI_Animation_All.TC001_PresentationCreation_ChooseTheme(NewUI_Animation_All.java:12)
... Removed 24 stack frames
Thanks in Advance.
Upvotes: 0
Views: 667
Reputation: 5740
You didn't describe how you run your tests, but if you want the complete Stacktrace, you can:
-Dtestng.show.stack.frames=true
JVM option or System.setProperty("testng.show.stack.frames", "true")
in your codeverbose>=2
)Upvotes: 1