Detailed list of actions | Ranorex
Help CenterUser GuideRanorex Studio fundamentals

Detailed list of actions

This chapter contains a detailed list of available actions with a short summary of the action characteristics, features & options.

In this chapter

    Mouse action

    Summary: Adds a new mouse action item
    Type:  Basic action
    Variables:  Yes
    Linked to Repository:  No

     

    Description:

    This mouse action can be used for ‘Up’, ‘Down’, ‘Click’, ‘Double-Click’ and ‘Move’-actions. This action is typically used for button clicks so a repository item assignment is required.

    Subactions:

    • Up/down
    • Click/double-click
    • Move

    Buttons:

    • None
    • Left/middle/right
    • additional buttons 1, 2, …

    Mouse wheel action

    Summary: Adds a new mouse wheel action item
    Type:  Basic action
    Variables:  Yes
    Linked to Repository:  No

     

    Description:

    The mouse-wheel action can be specified as ‘Vertical’ or ‘Horizontal’ direction. You are also able to specify a wheel-delta, which is 120 by default.

    Orientation:

    • Horizontal/vertical

    Touch action

    Summary: Touch screen action
    Type:  Basic action
    Variables:  No
    Linked to Repository: Yes

     

    Description:

    A touch event can be used to perform different kinds of touch events on mobile devices as well as on Windows 8 desktops. The duration of the different kinds of touch events can be defined in the properties pane. You can open this pane by clicking the context menu item ‘Properties’ on the ‘Touch Event’ action item.

    Touch types:

    • Touch
    • DoubleTap
    • LongTouch
    • TouchStart / TouchMove / TouchEnd

    Swipe gesture

    Summary: Touch screen swipe gesture
    Type:  Basic action
    Variables:  Yes
    Linked to Repository: Yes

     

    Description:

    This action can be used to simulate a swipe gesture on a given repository item. You can specify the direction and the distance as well as the swipe duration. The distance can either be specified in pixels or as a percentage relative to the repository item connected to the action. The swipe gesture can only be added manually, it will not be recorded. Additionally, you can set the start location as well as the amount of swipe steps in the properties pane. The properties pane can be accessed by right-clicking the swipe action and choosing ‘Properties’ in the context menu.

     

    Possible swipe directions:

    • Right (0°)/ down (90°) / left (180°) / up (270°)
    • 45°, 135°, 225°, 315°
    • As new variable

    Distance:

    • 100, 250, 1, 0.5, 1.0 (px)
    • As new variable

    Swipe duration:

    • 100ms, 500ms, 800ms, 1s
    • As new variable

    Key shortcut

    Summary: Shortcut keyboard action
    Type:  Basic action
    Variables:  Yes
    Linked to Repository: Yes

     

    Description:

    This action can be used for executing key shortcut actions. Aside from the shortcut itself, it is possible to specify the events ‘Press’, ‘Up’ and ‘Down’. For this action, a repository item assignment is not required.

     

    Possible key code:

    • Up / down
    • Press

    Key sequence

    Summary: Keyboard sequence action
    Type:  Basic action
    Variables:  Yes
    Linked to Repository: Yes

     

    Description:

    This action makes it possible to execute or to simulate a key sequence. This action is typically recorded in a form filling scenario (e.g. username field in login process). For this action, a repository item assignment is not required. To protect proprietary data like passwords you can mask the key sequence by setting the option ‘Mask Sequence’ in the properties pane.

    Mobile key press

    Summary: Mobile keyboard action BACK , {MENU} ]
    Type: Basic action
    Variables: No
    Linked to Repository: Yes

    Description:

    This action can be used for pressing mobile keys like BACK and {MENU}. This chapter is covered in a separate part of the user guide.

    Further reading

    Mobile testing is introduced and explained by example in > Web & mobile testing > Mobile testing > ⇢ Introduction.

    Validation action

    Summary: Test validation action
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    The validation action is typically used for validating states, text or images of specific repository items. Every validation action leads to a specific entry in the report file and, depending on the type of validation and the validated element, there may be different validation results (success, failure). After assigning a repository item, you are able to choose one of the below-listed validation-types.

    Exists

    The validation checks for the existence of the repository item and expects an existing item.

    NotExists

    The validation checks for the existence of the repository item and expects the item not to exist.

    AttributeEqual:

    This validation checks whether an attribute (column ‘Match Name’) equals a specific value (column ‘Match Value’). The matching attributes depend on the assigned repository item and therefore an assignment of a repository item is assumed. For example, a WinForms button may be validated on ‘Text’, on the ‘Valid’ state, on the ‘Pressed’ state and also on ‘AccessibleName’, ‘AccessibleValue’ etc. The matching value can either be a constant, a self-defined value or a module variable.

    AttributeNotEqual:

    This validation checks whether an attribute (column ‘Match Name’) does not equal a specific value (column ‘Match Value’). The matching attributes depend on the assigned repository item and therefore an assignment of a repository item is assumed. For example, a WinForms button may be validated on ‘Text’, on the ‘Valid’ state, on the ‘Pressed’ state and also on ‘AccessibleName’, ‘AccessibleValue’ etc. The matching value can either be a constant, a self-defined value or a module variable.

    AttributeRegEx:

    This validation is for matching a ‘match value’ (self-defined match value or the content of a module variable) against a specific attribute (column ‘Match Name’) using a regular expression. Because the attribute itself (column ‘Match Value’) depends on the assigned repository item, assignment of a repository item is recommended prior to choosing a match value. If you plan to use a variable within this type of validation, you can easily implement your regular expression in the value of that variable.

    AttributeContains:

    This validation checks whether a specific attribute (column ‘Match Name’) of a specific repository item contains a ‘match value’. The match value can either be a user-defined constant value or it can also be the content of a module variable. As before this validation assumes the assignment of a repository item.

    ContainsImage:

    This validation checks whether the assigned repository item contains a specified screenshot. This screenshot can be easily created with the ‘Edit Image Validation’ dialog which can be accessed via a button in the ‘Screenshot’ column. You can enable reporting the similarity in the properties pane. This can be useful for tweaking the similarity of the corresponding image validation action.

    CompareImage:

    This validation checks whether a specified repository item is equal to a specific screenshot. This screenshot can be easily created within the ‘Edit Image Validation’ which can be accessed via a button in the ‘Screenshot’ column. For a better understanding of what is different between the two compared images, you can enable ‘Report Difference Images’ in the properties pane. This will report a difference mask showing the differing pixels as well as the differential image. Additional you can enable reporting the similarity in the properties pane. This can be useful for tweaking the similarity of the corresponding image validation action.

    Further reading

    Regular expressions are an expert topic which is introduced and explained in > Ranorex Studio expert > Regular expressions > ⇢ Introduction.

    Further reading

    The fundamental concept of test validation is introduced and explained in detail in > Ranorex Studio fundamental > Test validation > ⇢ Introduction.

    Invoke action

    Summary: Invoke action
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    Used for invoking actions on the specified repository item. This action can be used to easily select items in lists and drop-downs. No mouse movement and click is simulated but nevertheless, the item itself is selected. This is a more powerful and smarter action than simulating the selection via mouse actions. Invoking a select action on a specific item also works if the item itself is not visible by default because there are too many elements in the list.

    Further reading

    The powerful and various applications of invoke actions are described in a separate in > Ranorex Studio fundamental > Actions > ⇢ Invoking actions.

    Get value action

    Summary: Action delivering a value from an underlying UI-element
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    As the action name indicates, this method can be used for getting values from repository items. Depending on the assigned repository item, the available attributes can be different. The value obtained can be assigned to a module variable.

    GetValue action example

    GetValue action example

    Attribute of UI-element where value is to be retrieved from
    Variable which is to hold and store the retrieved value
    Capture regex: option to define a regular expression on the value prior to storing it in the variable
    Repository item: corresponding repository item

    Common application example

    A common application example of this action is the extraction of a (variable) sub-text from a resulting string information needed for test validation.

    Set value action

    Summary: Action setting the attribute value of a repository item
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    As the action name indicates, this method can be used for setting the attribute values of repository items. Depending on the assigned repository item, the available attributes might be different.

    SetValue action example

    SetValue action example

    Attribute, defines which attribute of the corresponding UI-element is to be set by the value
    Value, constant value, or variable to hold a value to be set
    Repository item: corresponding repository item

    Open browser action

    Summary: Opens a browser and navigates to the given URL
    Type: Smart action
    Variables: Yes
    Linked to Repository: No

     

    Description:

    This action can be used for opening a browser. For preparation, you are able to use the parameter ‘URL’ for directly opening a website. The parameter browser can be used for choosing a browser (e.g. ‘IE’, ”, Firefox’, Chrome’, ‘Chromium’, ‘Edge’).

    Open browser action

    Open browser action

    URL, constant value for website to open, or definition of a variable holding the URl to open
    Browser, option to select a browser (technology)
    Screen size parameter: Set to ‘false’, the URL is opened in the default browser window size. If set to true, the browser will be opened in maximized window size.

    Run application action

    Summary: Runs an application at the given directory and file path
    Type: Smart action
    Variables: Yes
    Linked to Repository: No

     

    Description:

    This action can be used to run an application with the filename specified in the column ‘File Name’. You can also pass arguments (column ‘Arguments’) and define the working directory.

    Run application action

    Run application action

    File name, constant value for executable file name of application. Alternatively, a variable holding the location and file name of the executable.
    Arguments, option to pass arguments for the application

    Working directory:

    • Optional information for the working directory of the application
    • Can be set as a constant value, or as variable
    • If not changed, similar to a directory of the application executable

    Run mobile app

    Summary: Runs an application on a mobile device
    Type: Smart action
    Variables: Yes
    Linked to Repository: No

     

    Description:

    When using this action, you can specify a ‘Device’, an ‘App’, and whether the specified app should be restarted or not.

    Further reading

    Mobile testing and all corresponding actions are introduced and explained in detail in > Web & mobile testing > Mobile testing > ⇢ Introduction.

    Deploy Android / iOS app

    Summary: Instruments the given Android application and deploys it on the given mobile device or deploys the already instrumented iOS application on the given mobile device
    Type: Smart action
    Variables: Yes
    Linked to Repository: No

     

    Description:

    When using this action, you can specify a ‘Device’ and an ‘APK/IPA file’. The given application will be deployed to the given device.

    Further reading

    Mobile testing and all corresponding actions are introduced and explained in detail in > Web & mobile testing > Mobile testing > ⇢ Introduction.

    Device orientation

    Summary: Sets the orientation of the device either to ‘Portrait’ or ‘Landscape’
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    When using this action, you can specify the orientation of the device. You can choose one of the following orientations: ‘Portrait’, ‘PortraitUpsideDown’, ‘LandscapeLeft’, ‘LandscapeRight’.

    Further reading

    Mobile testing and all corresponding actions are introduced and explained in detail in > Web & mobile testing > Mobile testing > ⇢ Introduction.

    Close application

    Summary: Closes an application or website containing the given repository item
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    This action can be used for closing applications and websites. If the ‘Close Method’ is set to ‘CloseWindow’, the application is attempted to be closed. If the parameter ‘Grace Period’ is set to a value greater than 0 ms, the process will be killed after the ‘Grace Period’ if closing the application failed. If ‘Close Method’ is set to ‘KillProcess’ the application’s process is killed immediately and the grace period is ignored.

    Close application action

    Close application action

    Close method, option for closing application regular, or killing the application process
    Grace period, the time before the application process is killed in case of closing application failure when setting to a value greater than zero
    Repository item, corresponding repository item of application to be closed

    Wait for action

    Summary: Waits for a given repository item to appear or disappear
    Note: This action can be used for any type of UI element
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    The ‘Wait for’ action is to wait until a specific state is reached within a specific timeout. The following Wait-For types are available:

    Exists

    Waits until the assigned repository item exists within the specified timeout (‘Timeout’).

    NotExists

    Waits until the assigned repository item stops existing within the specified timeout (‘Timeout’).

    AttributeEqual

    Waits until an attribute (‘Match Name’) of the assigned repository item is equal to a specified value (‘Match Value’) within the specified timeout. To change the timeout, right-click the action, click ‘Properties’, and enter the desired timeout in seconds in the ‘Wait Timeout’ field.

    AttributeNotEqual

    Waits until an attribute (‘Match Name’) of the assigned repository item stops being equal to a specified value (‘Match Value’) within the specified timeout. To change the timeout, right-click the action, click ‘Properties’, and enter the desired timeout in seconds in the ‘Wait Timeout’ field.

    AttributeContains

    Waits until an attribute (‘Match Name’) of the assigned repository item contains a specified value (‘Match Value’) within the specified timeout. To change the timeout, right-click the action, click ‘Properties’, and enter the desired timeout in seconds in the ‘Wait Timeout’ field.

    AttributeNotContains

    Waits until an attribute (‘Match Name’) of the assigned repository item stops containing a specified value (‘Match Value’) within the specified timeout. To change the timeout, right-click the action, click ‘Properties’, and enter the desired timeout in seconds in the ‘Wait Timeout’ field.

    Report action

    Summary: Adds a new report action item logging a user-defined message
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    The report action can be used to either write a log message to the report, capture a screenshot at the given time during the test, or capture a Ranorex snapshot at the given time during the test run.

    Further reading

    The report action is introduced and explained in detail in > Ranorex Studio fundamentals > Reporting > ⇢ Introduction.

    Separator

    Summary: Inserts a separation line on the currently selected position in the actions table
    Type: Smart action
    Variables: No
    Linked to Repository: No

     

    Description:

    A separator can be used to visually separate recordings into smaller sections to get a clearer view of “thematically” related actions. You can specify a ‘Header Text’ to name or describe the following group of actions.

    Further reading

    The separator action is part of recording and is explained and introduced in > Ranorex Studio fundamentals > Reporting > ⇢ Basic report characteristics & data.

    Delay

    Summary: Adds a new delay action item
    Type: Smart action
    Variables: Yes
    Linked to Repository: No

     

    Description:

    A delay action can be used to pause test automation execution for a specific time (column ‘Duration’). This time delay is not scaled with the speed factor and is also present in ‘Turbo Mode’

    User code actions

    Summary: Adds a new user code action item which is used, for example, to implement a user-specific validation in code
    Type: Smart action
    Variables: Yes
    Linked to Repository: Yes

     

    Description:

    User code actions can be used to execute custom class methods defined in the recording user code file.

    Further reading

    User code actions are explained and introduced by example in > Ranorex Studio fundamentals > Actions > ⇢ User code actions.