Page 1 of 1

Passing different values to recording module

Posted: Mon Apr 10, 2017 8:34 pm
by marlonc
Hi,

I have a recording module that accepts parameter. In one test case, I want the value to have A, and on other test case, I want the passed value to be B. However, when I bind the parameter, both instances are changed.

I intend to do the following
TC1
--SetValueRecording <<<bound variable A = "test"
TC2
--SetValueRecording <<bound variable B = "test2"

but what happens when I change TC2:
TC1
--SetValueRecording <<<bound variable A = "test2"
TC2
--SetValueRecording <<bound variable B = "test2"

Are there any ways I can achieve this?

Re: Passing different values to recording module

Posted: Tue Apr 11, 2017 9:22 am
by odklizec
Hi,

I don't quite understand what's the problem? You can either create a new parameter in each TC, each with its own value for respective TC. Or you can create a data connector for each TC, from which you can fill the recording module variable. I would strongly recommend to go through this chapter in Ranorex user guide:
http://www.ranorex.com/support/user-gui ... sting.html

Re: Passing different values to recording module

Posted: Tue Apr 11, 2017 8:06 pm
by marlonc
Thanks. Im sorry but I may have posted the wrong scenario.
I have recording module that accepts a parameter. Within 1 test case, I want to pass different values for that module.

Code: Select all

TCVerifyForAutocomplete
   RecModuleEnterFields       "entryName"    << contains 15 steps that fills in other fields
   RecModuleDelete                                       << deletes the field values
   RecModuleEnterFields       "en"                  << should autocomplete
   ValidateEntry
When I open the data binding window, it is for the whole test case. How do I go around this to bind different values to RecModuleEnterFields.

Re: Passing different values to recording module

Posted: Tue Apr 11, 2017 8:20 pm
by marlonc
Well SmarFolder does this for me allowing different values passed to two instances of that module in the same test case. Only doable with Ranorex 7. Problem solved! :lol:

Code: Select all

TCVerifyForAutocomplete
   SmartFolder
        RecModuleEnterFields       "entryName"    
   RecModuleDelete                                       
   SmartFolder
        RecModuleEnterFields       "en"             
        ValidateEntry

Re: Passing different values to recording module

Posted: Wed Apr 12, 2017 2:10 pm
by krstcs
Actually, any version of Ranorex allows that as long as you either bind the variable to a different data entity, or nest more test cases (which is what you are doing with folders, they are just a new type of test container to go along with test cases).