Skipping an iteration without reporting an error

Ask general questions here.
kshekharkumar
Posts: 24
Joined: Thu Feb 06, 2014 10:57 am

Skipping an iteration without reporting an error

Post by kshekharkumar » Fri Apr 25, 2014 8:05 am

Hi,

I would like to know if there is any way to skip an iteration without throwing any exception. Currently I have implemented as in the screenshot and it throws error (screenshot attached)...

Thanks,
Shekhar
Attachments
Iteration_Skip1.png
Report
Iteration_Skip1.png (118.66 KiB) Viewed 723 times
Iteration_Skip2.png
Implementation
Iteration_Skip2.png (12.45 KiB) Viewed 723 times

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

Re: Skipping an iteration without reporting an error

Post by Support Team » Wed Apr 30, 2014 3:59 pm

Hi Shekhar,

Here in our forum a similar problem was discussed once.
Please have a look at this post. There is also a sample project attached, where you can see in detail which code is used in the recording module.

Please let us know if this helps you to solve your problem.

Regards,
Markus (S)
.
Image

kshekharkumar
Posts: 24
Joined: Thu Feb 06, 2014 10:57 am

Re: Skipping an iteration without reporting an error

Post by kshekharkumar » Tue May 06, 2014 6:53 am

Hi Markus,

Thanks for the reply.

I tried the solution suggested in your sample but it seems the iteration is just skipped in Report but actually gets executed. [see attachment of the sample]

What I really was looking for is the iteration should not be executed at all.

I had earlier gone through this example.

Let me know if I am missing something here.

Thanks,
Shekhar
Attachments
Iteration_Skip3.png
Iteration_Skip3.png (195.65 KiB) Viewed 678 times

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

Re: Skipping an iteration without reporting an error

Post by Support Team » Fri May 09, 2014 4:00 pm

Hi Shekar,

Unfortunately it is not possible to skip an iteration out of the box. Probably you have to use undocumented API methods but this is not recommended and we do not guarantee for any side-effects. We also preserve the right to change internal methods at any time.

Regards,
Markus (S)
.
Image

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Skipping an iteration without reporting an error

Post by odklizec » Fri May 09, 2014 4:16 pm

Hi Shekhar,

I was in a need of something similar (to skip all remaining iterations after an error) and I was provided with a solution (using undocumented API methods). Check out this post:
http://www.ranorex.com/forum/how-to-sto ... tml#p24582
It would be great to have something more official, but so far it works as expected. Hope it helps to you too?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration