ErrorUtil NOT Capturing the Assertions.... | Selenium Forum
M
Posted on 18/11/2015
Hi Ashish / All,

I am facing challenging in capturing the errors.. Attached my sample code of program..


I have main method.. which is calling the module..

Both main and module has assertion... when the module is calling.. it compares the text in the assert.assertequals(...)... when the exception occurs.. I dont see its coming to the catch statement ...rather assertion takes me to the invoker.class (jar)

2) i want to catch the exception and proceed to the main program and execute the below statement of the code... which is NOT happening in error scenarios.. where as in the success scenairo it work well..since there is NOT error..

Could you kindly provide input here... what i am doing wrong...

Thanks


Regards
J

M
Replied on 19/11/2015

[quote:19lxz96e]when the exception occurs.. I dont see its coming to the catch statement[/quote:19lxz96e]
so, the catch statement is not executing it?
try to print something in catch statement, to know for sure.


M
Replied on 19/11/2015

It is printing in the catch block, but the control is NOT Coming back to the main program and execute the rest of the below code.

Rather it again start from the first line for the second test cases... which obviously failing.. because its NOT Locating element.

Thanks

Regards
J


M
Replied on 19/11/2015

Sorry, yes right.. Its NOT Coming to the exception block at all...

Am I doing anything wrong ?

Thanks

Regards
J


M
Replied on 19/11/2015

Looks like I FOUND the same, Please ignore it.

Thanks