Is it possible to record video thru Ranorex API

Ask general questions here.
User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Is it possible to record video thru Ranorex API

Post by Aracknid » Tue Mar 05, 2019 5:27 pm

Hi,

I'm using VisualStudio and Ranorex API. I'd love to be able to record a video. I see that the Ranorex.Core object has a number of settings for this new feature. Is it possible to enable video and set options in code? If so can you provide sample code?

Thanks,

Aracknid

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: Is it possible to record video thru Ranorex API

Post by N612 » Tue Mar 05, 2019 5:49 pm

Are you using a test suite at all? I believe this is a test suite setting per where the setting is stored and the code below. Albeit this code does not work within a test suite since the reporting has already started with the setting predefined the TS's xml (Ranorex.Core.Reporting.TestReport.Setup(...)).

Code: Select all

TestSuite.Current.ReportSettings.VideoRecordingMode = Ranorex.Core.Reporting.TestReport.VideoRecordingMode.KeepAllTests;
VideoRecordingMode Enum: https://www.ranorex.com/Documentation/R ... ngMode.htm

TS xml:

Code: Select all

...
VideoBitrate="2000"
VideoFps="15"
VideoRecordingMode="Off"
VideoSource="Auto"
...

User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Is it possible to record video thru Ranorex API

Post by Aracknid » Tue Mar 05, 2019 6:02 pm

Nope, not using a TestSuite. I don't use the Studio and never created anything in it. I just use the API in visual studio and hand code everything (been doing this for 8-9 years).

Aracknid

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: Is it possible to record video thru Ranorex API

Post by N612 » Tue Mar 05, 2019 9:32 pm

As far as I can tell, there is no public API to invoke Ranorex to record the playback during runtime. I recommend creating a feature request here. In the meantime, perhaps you can execute FFmpeg directly to record your automation? FFmpeg.exe can be found here:

Code: Select all

C:\Program Files (x86)\Ranorex\Studio\Bin\Runtime\ffmpeg.exe