Record & Generate

The integrated Ranorex Recorder captures user actions like mouse moves or keystrokes to generate Ranorex automation code directly within your test project.  The recorded code is managed within an additional file named ‘RecordedData.cs’. This file represents the class ‘Automation’ which is part of the user specific namespace. Each recording is saved in a single method starting with ‘Testn()’ (n = 1,2,3,...) as part of the ‘Automation’ class.
Recorder generated automation code in the RecordedData.cs file.

How to: Start recording

Before starting a new recording, prepare your application(s) under test. Start a new recording using the ‘Record’ button from the tool strip menu. Ranorex Studio is now minimized to the system tray. An active recording is indicated through the animated Ranorex icon.

How to: Stop recording and generate code

To stop recording press the ‘SHIFT’ + ‘ESC’ shortcut or click the Ranorex system tray icon. Replay the captured user actions to generate optimized test automation code.

Replay or rerecord user actions
Get code or start new recording

How to: Use and call Recorder generated automation code

Retrieve the generated code after successful replay of recorded user actions by clicking the ‘Get Code’ button. If there were any problems during the playback, click the ‘Replay’ or ‘Cancel’ button. To run recorder generated code, it is necessary to call the Recorder generated method (i.e. ‘Test1()’ ) from the main routine of your test application as follows:

How to call the recorder generated method Test1()