how to skip to next record on error

Ask general questions here.
M-K-B
Posts: 9
Joined: Tue Nov 28, 2017 12:52 pm

how to skip to next record on error

Post by M-K-B » Mon Dec 04, 2017 7:39 am

Hi
when i run my test suite and in one of test case record error occurred for example element not found i want to skip to next record not go to next test case
i really appreciate if you help me with this
thanks in advance

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

Re: how to skip to next record on error

Post by odklizec » Mon Dec 04, 2017 8:49 am

Hi,

This should be doable with properly set Test Suite Error Behavior. I guess "Continue with parent" or Continue with sibling should help?...
https://www.ranorex.com/help/latest/les ... ersettings
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

M-K-B
Posts: 9
Joined: Tue Nov 28, 2017 12:52 pm

Re: how to skip to next record on error

Post by M-K-B » Mon Dec 04, 2017 9:28 am

hi
that wont help me
if an element on form dont exist i dont want test suite stop and abort i want to continue to next record on that test case
thanks for your response

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

Re: how to skip to next record on error

Post by odklizec » Mon Dec 04, 2017 9:40 am

Ah sorry, I misunderstood your original post. In this case, I'm afraid, there is most probably no other way than to handle the Ranorex exception via code. You will have to convert entire recording module(s) into user code and enclose entire code in Try...Catch block and handle the exception in catch block.

But honestly, I would suggest not to use the above approach. You see, if Ranorex cannot find an element, then you should not pretend everything is OK and continue with the test as if nothing happens. This is really not a very good idea! You should either mark the test as failed or make sure Ranorex always finds the element (either by adapting the element's xpath or by reporting the problem to app developer, so they fix it).
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

M-K-B
Posts: 9
Joined: Tue Nov 28, 2017 12:52 pm

Re: how to skip to next record on error

Post by M-K-B » Tue Dec 05, 2017 10:13 am

hi
i solve this problem with putting my records in separate smart folder then if error happened in one of records the other records continue and at the end other test case also run without any problem with this i can check the whole test suite to run and if error happens all of records are continue till end

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

Re: how to skip to next record on error

Post by odklizec » Tue Dec 05, 2017 10:21 am

Hi,

Yes, that's good approach too. Nice to hear you found a suitable solution! ;)
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