Pass in an argument

Ask general questions here.
phoned9339
Posts: 1
Joined: Tue Apr 11, 2017 11:06 pm

Pass in an argument

Post by phoned9339 » Tue Apr 11, 2017 11:08 pm

I would like to do a build and pass in an argument that is later typed by the user.

For example, in a certain location (textbox), I want to type in the user's name "Jim", however this may change to another name, so would like to have the build have an input argument, i.e., --name "Jim", and then input can then change to someone else's name, i.e., --name "James", and that would then feed into the same textbox.

Is this possible?

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

Re: Pass in an argument

Post by odklizec » Wed Apr 12, 2017 7:33 am

Hi,

You mean you would like to start the test with command line parameter containing the name?, Yes, that's possible. Simply create a Global Parameter in your test suite. Then in your recording, variabilize the SetValue/EnterText action and connect newly created recording variable with Global Parameter. Now you can start your test with command line parameter. 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