Ranorex exe not accepting parameters from command line

Ask general questions here.
kewpiedoll99
Posts: 8
Joined: Wed May 20, 2015 9:13 pm

Ranorex exe not accepting parameters from command line

Post by kewpiedoll99 » Thu May 28, 2015 7:16 pm

I have a project with two params which I have defined in Global Parameters and bound to modules in the test case. When I look at Global Parameters for the project, it says they are "[Unbound]" in the Module Variable column, but in the Data Binding for the test case it shows them bound. (Screen shots attached.) I have tried passing the parameters when trying to run the exe from the command line, as well as when running in debug mode using values entered in the Start Options from the Debug pane of the project parameters.

In either case the parameters are simply not being found by the project while running.

i am calling it from the cmd line thus:

Code: Select all

$ src/main/resources/downloadAndInstall.exe /pa:downloadUrl="<URL here>" /pa:hostEntriesText="127.0.0.1 localhost"
output includes this line:

Code: Select all

[2015/05/28 14:00:54.223][Info   ][Data]: Current variable values:
$hostEntriesText = ''
As you can see it doesn't even report the other variable that I'm passing.

I also tried it without the quotes around params but that didn't help. Also, my second parameter actually has multiple lines so I'm not sure how to ensure I pass it correctly. However, I tried it with a single line for that param to eliminate it as a source of the bug. No joy. I'm pretty frustrated.

I'll attach a zip of my project so you can see what I've got going on. Soonest help would be most highly appreciated as I have been struggling with this for a few days now. Thanks!

PS This form will not allow me to include a URL in my post as it's a new account, so where it says <URL here> that's why
Attachments
downloadAndInstall.zip
zip of project
(999.81 KiB) Downloaded 50 times
Screen Shot 2015-05-28 at 1.48.47 PM.png
Data binding view
Screen Shot 2015-05-28 at 1.48.47 PM.png (30.99 KiB) Viewed 747 times
Screen Shot 2015-05-28 at 1.48.27 PM.png
Global Parameters view
Screen Shot 2015-05-28 at 1.48.27 PM.png (29.96 KiB) Viewed 747 times

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

Re: Ranorex exe not accepting parameters from command line

Post by odklizec » Fri May 29, 2015 11:39 am

Hi,

The whole problem is caused by wrong (and probably forgotten) command line arguments in project options...
DebugArguments.png
DebugArguments.png (11.62 KiB) Viewed 741 times
The arguments should be /pa: and not \pa:
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

kewpiedoll99
Posts: 8
Joined: Wed May 20, 2015 9:13 pm

Re: Ranorex exe not accepting parameters from command line

Post by kewpiedoll99 » Sun May 31, 2015 10:10 pm

Thanks. I'm not even sure why I would have been using backslash inside Ranorex... Good catch.

Do you know why it wouldn't work from the command line? You can see from the code samples that I'm using (regular) slashes there.

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

Re: Ranorex exe not accepting parameters from command line

Post by odklizec » Mon Jun 01, 2015 7:28 am

Hi,

It should work from command line? But I think the problem is that you forgot the command line argument in start options? Once removed, your project should start OK from command line. Just remove debug arguments from Project Options, recompile your solution and try to start it from command line with correct parameters.
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