Execute a recording from code on Ranorex

1k Views Asked by At

Does anyone know how to execute a recording file (rxrec) from code (I am using C#)? I did look for examples and I couldn't find any.

Thanks!

4

There are 4 best solutions below

1
On BEST ANSWER

In the standalone recorder (not in Ranorex Studio!!), you can export the recording to as an executable. You can call the EXE file in your code.

enter image description here

3
On

There is a Ranorex API for this. Just use this line of code.

NameOfYourRecording.Run();
0
On

I haven't tried yet, but you can execute a testcase through command line: run outside ranorex IDE

So if you execute something similar in your C#, I guess it should do the trick. It's not really executing an rxrec file from your code, but result should be equivalent.

0
On

I assume that you want to execute the Ranorex recording from a different C# project. You can compile your Ranorex project as ".dll" and then add reference to this dll in your other project. After this you should be able to run any recording with {RecordingName}.Start().