Hi Team,
I tried to run Ranorex from Command line, but was not able to succeed. Please list the steps to do so. Also, where are all the options listed for this. I could see a sample in the userguide, but that also didnt help me.
I moved to location: C:\Program Files\Ranorex 2.3\Bin\
and ran the below command:
Ranorex.Recorder.exe /rp C:\RanoreX\Test\Recording1.rxrec /p /q
Got the error as: "Code Items are skipped during recording file playback."
Also, I tried to run the RanorexStudio.exe and gave the project exe path but no luck.
I need to run the entire solution/project. Please suggest.
Thanks
Running Ranorex from Command Line
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Running Ranorex from Command Line
Hi,
When you compile your project to an executable, you can then easily start that executable from the command line.
Please also take a look to our tutorial
http://www.ranorex.com/Documentation/Ra ... torial.pdf
Regards,
Peter
Ranorex Support Team
Because code items are - as their name suggests - defined by source code and need to be compiled and executed by the generated Ranorex application in order to run.jainaakash wrote:Got the error as: "Code Items are skipped during recording file playback."
Compile and run the generated Ranorex application by pressing the <F5> key on your keyboard or by selecting "Debug -> Run" from the Ranorex Studio menu bar.jainaakash wrote:Also, I tried to run the RanorexStudio.exe and gave the project exe path but no luck.
I need to run the entire solution/project. Please suggest.
When you compile your project to an executable, you can then easily start that executable from the command line.
Please also take a look to our tutorial
http://www.ranorex.com/Documentation/Ra ... torial.pdf
Regards,
Peter
Ranorex Support Team
-
- Posts: 48
- Joined: Thu Jun 10, 2010 12:06 pm
Re: Running Ranorex from Command Line
Thanks Peter,
I was able to run the exe from the cmd. But I had tried running the RanorexStudio and Ranorex recorder exes then the path of the actual exe which didnt work.
Now, next I want to pass some commandline arguments while running the exe. Is it possible for VB.NET proj.?
The main function in a VB solution/project is defined as :
Function Main() As Integer
and does not have any args, whereas the Main function for a C# proj is defined as:
public static int Main(string[] args)
I have gone through the link:
http://www.ranorex.com/blog/defining-ex ... ur-ui-test
Thanks.
I was able to run the exe from the cmd. But I had tried running the RanorexStudio and Ranorex recorder exes then the path of the actual exe which didnt work.
Now, next I want to pass some commandline arguments while running the exe. Is it possible for VB.NET proj.?
The main function in a VB solution/project is defined as :
Function Main() As Integer
and does not have any args, whereas the Main function for a C# proj is defined as:
public static int Main(string[] args)
I have gone through the link:
http://www.ranorex.com/blog/defining-ex ... ur-ui-test
Thanks.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Running Ranorex from Command Line
Hi,
Here is a sample code for the main with arguments in VB .Net
Peter
Ranorex Support Team
Here is a sample code for the main with arguments in VB .Net
Shared Sub Main(ByVal args As String()) For Each arg As String In args Console.WriteLine(arg) Next arg Console.ReadLine() End SubRegards,
Peter
Ranorex Support Team
-
- Posts: 48
- Joined: Thu Jun 10, 2010 12:06 pm
Re: Running Ranorex from Command Line
Thanks Peter,
I had tried the same code earlier which didn't work BUT when u gave it, it worked with some modification..
Thanks.
Main has to be declared Public and not Shared. I had added that in Program.vb.
That's what the message said when I declared Main as Shared:
-------
Methods in a Module cannot be declared 'Shared'. (BC30433) - C:\FlagStone\Automation\POC\RanoreX\VB\cmdLine\cmdLine\Program.vb:65
-------
Thanks.
I had tried the same code earlier which didn't work BUT when u gave it, it worked with some modification..

Main has to be declared Public and not Shared. I had added that in Program.vb.
That's what the message said when I declared Main as Shared:
-------
Methods in a Module cannot be declared 'Shared'. (BC30433) - C:\FlagStone\Automation\POC\RanoreX\VB\cmdLine\cmdLine\Program.vb:65
-------
Thanks.