Managing actionsActions can be modified and managed in multiple ways. These possible modifications are explained herein.
In this chapter
Cut/copy/paste/deleteCutting/copying/pasting and deleting is done by well-known keyboard, context menu and toolbar actions.
Cut/copy/paste/delete in context menu
Cut/copy/paste/delete in toolbar menu
Action content changeThe behavior of actions can directly be influenced by changing the content in the type-specific action list columns. This option for direct manipulation is introduced and explained along two representative examples.
Action content change
Run application action
- Change of file name, optional adding of run-time arguments and an optional specification of the working directory
- All of these can be bound to a variable
Mouse click action
- Specification of action type, button specification, action spot (location within UI-element) and reference to repository item
Disabling/enabling actionsActions can also be ‘disabled’, i.e. the action is not deleted, but the execution of the action is skipped until it is ‘enabled’ again.
- Disable/enable is selected through the context menu, or Ctrl+E
- Disabled actions are greyed-out
Setting search timeoutThe Set search timeout context menu is a shortcut to set the search timeout on the corresponding repository item. It defines the maximum time Ranorex searches for a UI-element with the specified RanoreXPath definition.
Setting search timeout in action context menu
Enable/disable continue on failWhenever an action leads to an exceptional state during the test the default reaction is that the test aborts. Sometimes this is not what you want the test run to do. So, there is the context menu option Continue on fail to define the failure behavior of an action.
Enable/disable continue on fail
Enabled on fail action
- Enable on fail/disable on fail is selected through the context menu
- Enabled on fail actions are graphically outlined
Viewing action codeActions are represented in programming code within Ranorex Studio. This code can be used, changed, modified and applied in expert test challenges. You can view the underlying programming code of each action by selecting the corresponding context menu item.
Example for action code view
Adding a new actionAdding a new action can either be done by recording or simply by clicking the corresponding menu. Here is how to do it!
Add new action – menus
Add new action menu in Studio toolbar
Add new action menu in action context menu
Adding new action by repository selectionIt is possible to create a new action by direct repository item assignment. To do so, drag the repository item into the action list and create a new action.
Add new action by repository item
Select a repository item and drag it up to the action list
Specify an action from the opening context menu
The new action is automatically linked to the source repository item.