Page 1 of 1

Run recording module based on get value

Posted: Tue Nov 27, 2018 9:05 pm
by armstronghm24
Hi,
I would like to get a value from my application and run a certain recording module only if the value I am retrieving from my application matches a value from another variable that I am assigning through data binding. Do I need to use a code module? If so, does anyone have any examples?

Re: Run recording module based on get value

Posted: Wed Nov 28, 2018 9:18 am
by odklizec
Hi,

In my opinion, the only way, how to achieve something like this code-lessly, is using Test Suite conditions:
https://www.ranorex.com/help/latest/ran ... ons-rules/

Basically, you will have to create a recording module, which will get the value, store it in a Global/TestCase/SmartFolder parameter, and then bunch of smart folders (as many as you have the modules you want to conditionally run), with condition and rules, and which will contain the recordings you want to run (based of the obtained value). The structure of the test suite should look like this:
[TestCase_1] <- here create a TC parameter, to store the value obtained later
...
|_GetValueRecMod <-- here you obtain the value and store it in TC parameter (by binding the rec. mod. variable to TC parameter)
|_[SmartFolder_A] <-- condition, evaluating TC parameter. If value match your expectation, smart folder and its content is run.
| |_RecMod_A
|_[SmartFolder_B]
| |_RecMod_B
|_[SmartFolder_C]
|_RecMod_C