Calling a user code function for recording modules

Ask general questions here.
Posts: 183
Joined: Wed Aug 06, 2014 12:00 pm

Calling a user code function for recording modules

Post by rastek » Thu Nov 03, 2016 8:57 pm

I wonder if there is a mechanism in recording modules, will call a usercode in case of a fail.

Normally Ranorex stop whenever a problem occurs (of the step is not checked as Continue on Fail)
What I need to a user code function whenever there is any fail in one of the steps in the module.

Is there a mechanism for that ? Or Do I need to put if else check for every functio/setp from user code ?

Lesson 4 telss teardown for test cases, but I need something like that for modoules also.


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

Re: Calling a user code function for recording modules

Post by odklizec » Thu Nov 03, 2016 9:09 pm


I'm afraid, there is no way to achieve what you want with recording module actions. The only solution could be converting all recorded actions to user code and then enclose the whole code in try...catch block, in which you can process the failure and do whatever you want. Hope this helps?
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