I want to skip following testcase - so i used 'throw new SkipException'
But it is throwing error in next line - system asking me to comment out all the subsequent lines.
How to skip test cases then?
I used (enabled=false) but why above not working?
public void sellStock() throws InterruptedException, ParseException {
//throw new SkipException("oooooo");
waitForPageLoad();
Instructor
Ashish Thakur Replied on 21/10/2019
The code should work. Please share the screenshot of the issue.
I was using TestNG framework above
Instructor
Ashish Thakur Replied on 24/10/2019
On what condition you want to throw skip exception?
Line number 146 will stop the execution immediately.
No matter what code is written after line number 146, that will not get executed.
Make sure that this is surrounded under a if statement.
Make sure that this is surrounded under a if statement.==> Can you please let me know what if statement?
Also if you see the subsequent lines, they are throwing errors - my understanding is mentioned this throw statement means i am skiping the execution and this will be first line under test case.
Instructor
Ashish Thakur Replied on 25/10/2019
If(Condition to check){
throw new skipException("Failure Message");
}
Surround the code with the code above.