How to Terminate test run

Best practices, code snippets for common functionality, examples, and guidelines.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

How to Terminate test run

Post by omayer » Fri Oct 28, 2011 8:50 pm

How to Exit out of specific test case and terminate the entire test suite,

if (Host.Local.TryFindSingle("/form[@title='Windows Internet Explorer']/button[@text='OK']",2000, out button))
{
Report.Screenshot("/form[@title='Windows Internet Explorer']");
button.Click();
...how do I exit after click on Ok button and terminate the testsuite

Thank you in advance
Beginner
Tipu

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to Terminate test run

Post by Support Team » Mon Oct 31, 2011 11:10 am

Hi,

Please take a look to following post
http://www.ranorex.com/forum/command-to ... html#p9575

Regards,
Peter
Ranorex Team
.
Image

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: How to Terminate test run

Post by omayer » Tue Nov 01, 2011 2:05 pm

Thank you Peter, this code worked - throw new RanorexException("text");
Omayer
Tipu