Hi,
I have a test case (with iteration from an Excel file with contacts), that contains two recording modules: One that checks if a contact exists and the second that creates a new contact in the case that it doesn't exist.
If the contact exists, I want just a warning (Report.Warn) and the code to bypass the second module of the test case.
In other words, if there is a contact already, I want the result green. For this reason I cannot use Validate fail in the first recording module because it makes red the final result.
I also used Report.Failure in the first module in the case of existence, but the code continues to the second module instead of skipping it.
I saw something with endmodule but I wasn't able to find a good example.
Any help?
Skip module during runtime?
Re: Skip module during runtime?
Hi,
I'm not quite sure if there is a way to disable a recording module in runtime, however, there is an easy way to achieve what you want. Simply enclose the optional module in nested TestCase and use code described below to skip or enable a test case:
how-to-continue-to-next-iteration-or-ju ... tml#p36500
I'm not quite sure if there is a way to disable a recording module in runtime, however, there is an easy way to achieve what you want. Simply enclose the optional module in nested TestCase and use code described below to skip or enable a test case:
how-to-continue-to-next-iteration-or-ju ... tml#p36500
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Skip module during runtime?
Yes, odklizec, it worked this way. Thank you.
Tot tell the truth, I would like the recording modules to be on the same level, but OK, this is secondary.
Thanks a lot
Tot tell the truth, I would like the recording modules to be on the same level, but OK, this is secondary.
Thanks a lot
Re: Skip module during runtime?
Myabe there is a coded way to disable Recording/Code module at runtime, but honestly, I've never looked into it
Usually, in my tests, I need to disable number of modules at once and so the TC-based way was much more convenient to me. Nice to hear it worked for you too.

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Skip module during runtime?
Question about new Ranorex 7.0:
I heard that GetTestCase() method is discontinued. This means it is not possible anymore to create nested test cases in my test suite.
A test case cannot have a parent test case anymore. Either the parent, or the child test case must be a smart folder instead.
So, we replace the GetTestCase with something other?
Thank you
I heard that GetTestCase() method is discontinued. This means it is not possible anymore to create nested test cases in my test suite.
A test case cannot have a parent test case anymore. Either the parent, or the child test case must be a smart folder instead.
So, we replace the GetTestCase with something other?
Thank you
Re: Skip module during runtime?
Any answer about the GetTestCase() in Ranorex 7.0?
Thank you
Thank you
Re: Skip module during runtime?
Hi,
Just replace GetTestCase with GetTestContainer method. Hope this helps?
Just replace GetTestCase with GetTestContainer method. Hope this helps?

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Skip module during runtime?
But the concept is again the same, isn't so?
Recording modules cannot be checked or unchecked so we need the GetTestContainer method in a parent container to be checked or unchecked in the code, correct?
Recording modules cannot be checked or unchecked so we need the GetTestContainer method in a parent container to be checked or unchecked in the code, correct?
Re: Skip module during runtime?
Yep, nothing changed in this matter in 7.x
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Skip module during runtime?
Thanks a lot odklizec.
Your help is always invaluable.
Your help is always invaluable.