Snapshot files
A Ranorex snapshot is a file representation of the user interface (UI) structure of an AUT at a particular point in time. A Ranorex snapshot captures all interface elements, their hierarchy, values, etc.
Snapshot files are created viewed in Ranorex Spy. Their file extension is .rxsnp
.
Typically, snapshot files are used to share detailed information about the UI of an application with the Ranorex support or technical sales team. They are also helpful when asking for technical help on our forums.
In this chapter
Screencast
The screencast “Snapshot files” walks you through information found in this chapter.:
Create a standard snapshot file
Standard snapshot files capture a UI that contains no hidden UI elements like menus, menu items, context menus, tool tips, etc. Creating a snapshot of a UI that contains these elements is explained in the next topic below.
To create a standard snapshot file:
Start your AUT (e.g. the Ranorex Studio Demo Application).
Start Ranorex Spy.
Using the TRACK button, track a UI element in the AUT (e.g. the Submit button as shown below).
In the toolbar of the element tree browser, click the Save as snapshot… button.
Name the file and specify where it should be saved.
Click Save to start snapshot file creation.
Note
The default save location for snapshot files is %USERPROFILE%RanorexSnapshots
.
While the snapshot is being created, a progress bar indicates progress. Upon completion, the following message appears. Click Close.
Note
Snapshots usually contain the tracked/selected UI element and the complete ancestor subtree, i.e. all elements of the respective application. You can change this default behavior under Settings > Advanced > Let snapshot contain complete ancestor subtree.
Further reading
Advanced settings are explained in
Ranorex Studio system details > Settings & configurations > ⇢ Advanced settings & configurations.
Create a snapshot of hidden UI elements
Some UI elements, such as drop-down menus, pop-up windows, combo boxes etc., only become visible after a an interaction like a click and usually disappear if the AUT loses focus. These elements are “hidden” and therefore not automatically included in a snapshot file. This is because they appear as separate items in Ranorex Spy at the top level of the element tree. Capturing these elements in a snapshot file requires use of the instant tracking function.
Further reading
Tracking hidden UI elements is explained in
Ranorex Studio advanced > Tracking UI elements > ⇢ Instant tracking.
An alternative method is explained in
Ranorex Studio advanced > Tracking UI elements > ⇢ Track button.
To create a snapshot file with hidden UI elements:
Start your AUT and navigate to where the hidden UI element you want to track appears (e.g. in the Test database tab of the Demo Application).
Start Ranorex Spy.
Make the hidden UI element visible, e.g. by opening the containing drop-down menu, as for the Project Management list item in the Demo Application, and ensure it is in focus, e.g. by mousing over it.
With the UI element in focus, press Ctrl+WIN.
The tracked UI element appears in the element tree in Spy.
Now immediately before anything else, press Scroll to create a snapshot of the previously tracked hidden UI element and its ancestor subtree and cache it to the working memory.
Snapshot file created successfully and cached to working memory. In this case, 10 UI elements were packed into the snapshot file, which is now opened in Ranorex Spy.
Warning that the snapshot file may be incomplete. This usually happens when you try to create a snapshot of hidden UI elements without using Scroll.
The snapshot file is automatically opened in Ranorex Spy. This is indicated by the status message that switches from LIVE to SNAPSHOT.
Save the snapshot file
Finally, you need to save the Scroll-created snapshot from the working memory to permanent storage.
In the element tree toolbar, click the Save as snapshot… button.
Name the file, specify where it should be saved, and click Save.
A message shows that the snapshot file was saved successfully.
Load a snapshot file
You can also load snapshot files in Ranorex Spy.
To do so:
Start Ranorex Spy and in the element tree toolbar, click the Load from snapshot… button.
Browse to the snapshot file you want to open.
Click Open.
Loading a snapshot – part I
Start Ranorex Spy and click Load from snapshot… in the toolbar
Choose folder and saved snapshot file
Click Open
Note
The default save location for snapshot files is %USERPROFILE%RanorexSnapshots
.
The snapshot file is opened in Spy, as indicated by the new element tree and the status indicator changing from LIVE to SNAPSHOT.
Status indicator showing the snapshot file’s date of creation.