How to call a recording module with parameter from console ?

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

How to call a recording module with parameter from console ?

Post by rastek » Tue Aug 12, 2014 3:01 pm

Hi,

How can I call a module and give its parameters from the console using the exe file ?

In the following page
http://www.ranorex.com/support/user-gui ... html#c4827

pa and tcpa are given but nothing is given for module level parametrisation.
(pa is for global level and tcpa is for test case level)

I tried mopa but not working.

Any help will be greatfull.

Thanks.
Last edited by rastek on Tue Aug 12, 2014 6:21 pm, edited 1 time in total.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to call a recording module with parameter from console ?

Post by krstcs » Tue Aug 12, 2014 3:44 pm

http://www.ranorex.com/support/user-gui ... html#c3022

If it isn't in the list of switches, then it isn't valid.

If you want to pass command line values to modules, you need to bind a global or test-case parameter to the module variable in the suite and then pass the appropriate switch with the value.

For instance, if you have a module variable called "Domain", you could create a Global Parameter called "G_Domain" and bind the Global Parameter to the module variable. Then at the command line you would type:

MyTest.exe /param:G_Domain="www.mydomain.com"

I recommend using quotes ("") around the value so that the system correctly recognizes all white-space and punctuation. Also, the parameter name in the command line must EXACTLY MATCH the Global Parameter name including Underscores and Case.
Shortcuts usually aren't...

rastek
Posts: 185
Joined: Wed Aug 06, 2014 12:00 pm

Re: How to call a recording module with parameter from console ?

Post by rastek » Tue Aug 12, 2014 6:28 pm

Hi krstcs

Thanks for answer but there are few points still unclear to me.

I also referenced the same page, and if you look at the page , there is no module-level parameter calling example.

I can bind and use global variables and they only work if I call all test or test case, they are not bind if I call module using the mo option.

you need to bind a global or test-case parameter to the module variable in the suite

I know how to binding, my all variables are bound to global variables. By the way there is not a such a thing to bind a module variable to test case variable.. they are same.. if you use a module inside a test case, you can bind it to global variable, thats it..

just put module inside a test case, right click and select "Data Binding" on recording module or on test case, you will go same window ? I think you understand what I mean. Is there an module-level binding option ??

And my issue is not about Underscores and Case, same command line works for case tc: , but not working for the case mo:

I need you to help me more.
Thanks,

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to call a recording module with parameter from console ?

Post by krstcs » Tue Aug 12, 2014 6:40 pm

As I said, if it isn't in the list of switches available, it won't work. There is no "mopa" switch in the list, so it isn't an option.


Everything I said in my first post was accurate.

You are incorrect on global vs test case parameters. They are LISTED in the same spot in the binding window, but they ARE NOT THE SAME. If you bind the module variables to a test case parameter, you can then use that parameter on the command line with the /tcpa:<TestCaseParamName>="Value" switch.


At this point, I'm not sure I can be of any more help to you as our understanding of the situation and options seems to be different.
Shortcuts usually aren't...

rastek
Posts: 185
Joined: Wed Aug 06, 2014 12:00 pm

Re: How to call a recording module with parameter from console ?

Post by rastek » Wed Aug 13, 2014 6:15 am

krstcs, let me tell you me desire in a more clear way, I want to call my recording modules with parameter and I dont want to call test cases..I want to call just modules with mo option..by the way, If you noticed, my post is calling a `recording module` with parameter, and I insist there is no `recording module-level` parameter calling example in that page you wrote to me..

If you look at the page I have same issue
http://www.ranorex.com/forum/binding-mo ... t2279.html

I am sending a screenshot to tell my problem. You can see my parameters are bound. I also tried to create a simple table as this guy told in his form, but it is not possible to bind a variable to a data column and to a global parameter at the same time.

I know to use test case parameters like you say, /tcpa:<TestCaseParamName>

but I can not get work them on module level.. They are working when I call with tc: form the exe file, but they are not working when I call mo: from the file.

So that means I already boundmy module variables to test case variables right because my modules got variables and they are inside a test case. I also bound them to global variables (again I am sure cos I am calling tc: with pa: in command line that means I am sending global parameters to my test case)

What I am asking is, is there an option to send parameter to recording moduledirectly without using parameter options pa or tcpa (I just give mopa as an example ,maybe there is sth like that.)

I know global parameters window, what i am saying is that there is not a seperate window per module..

Thanks.
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to call a recording module with parameter from console ?

Post by Support Team » Wed Aug 13, 2014 3:20 pm

Hello,

I would like to link following post:
http://www.ranorex.com/forum/data-bindi ... tml#p27586

Regards,
Robert