TCS
TCS

Reputation: 5900

Execute a recording from code on Ranorex

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!

Upvotes: 1

Views: 1200

Answers (4)

user1982826
user1982826

Reputation: 359

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

Upvotes: 2

Manoj
Manoj

Reputation: 67

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().

Upvotes: 1

Mikitori
Mikitori

Reputation: 617

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.

Upvotes: 1

RanorexPro
RanorexPro

Reputation: 36

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

NameOfYourRecording.Run();

Upvotes: 1

Related Questions