Action components & properties | Ranorex
Help CenterUser GuideRanorex Studio fundamentals

Action components & properties

The actions in a recording module are listed and managed in the actions table. This table is separated into columns, which represent the various components of an action. Actions also have properties, which allow you to control the behavior of an action and are another way of configuring an action’s components. In this chapter, you’ll learn how action components and properties work and how to set them.

In this chapter

    Action components

    The action table contains seven different columns. These columns represent the five different components an action can have. Some actions have less components, others more. The components are grouped as follows.

    Action components

    Action components

    Action symbol and sequence number

    • Each action has its own symbol.
    • The sequence number tells you the order in which actions are executed.

    Action type

    • The action type indicates what the action does or which part of a UI device it manipulates.

    Action specifics

    • The contents of columns 35 change depending on the action type.
    • They define what the action does in detail, i.e. the exact text string of a key sequence or the type of mouse click.

    Repository item

    • The repository item the action is performed on, i.e. the target of the action.
    • Repository items represent UI elements in the AUT.
    • Repository items are managed separately from actions, but they are linked to each other.

    Further reading

    Repositories and repository items are introduced in Ranorex Studio fundamentals > Repository > ⇢Introduction.

    Comment

    • Here you can add comments to document what an action does. This has no effect on the action itself.

    Action screenshots

    When you use the Ranorex Recorder to record an action that targets a UI element, a screenshot will be saved of the action. You can view this screenshot next to the action table. Click Screenshot to view or hide it.

    Turning screenshots on/off

    Turning screenshots on/off

    Action properties

    Action properties are the various options with which you can control the behavior of actions. There are two groups of action properties: Standard properties and action-specific properties. Standard properties define behavior that applies to most action types. Action-specific properties define behavior that applies only to particular action types.

    To configure an action’s properties:

    Right-click an action and click Properties.

    Click an action and press F4.

    Opening action properties

    One way of opening the properties of an action.

    Standard properties

    In this section, you’ll find a list of all standard properties and details about them. They can be configured for almost all action types. Default values are given in bold.

    Standard action properties

    Standard action properties

    Comment

    • Possible values: empty or text.
    • You can also set a comment directly in the action table.
    • Available for all actions except the Separator action

    Continue on fail

    • Possible values: false or true
    • If set to false, test execution stops when this action fails.
    • If set to true, test execution continues with the next action when this action fails.

    Duration

    • Possible values: time in milliseconds (default varies by action)
    • Defined action duration
    • Available for all actions except the Report and Separator actions
    Enabled

    • Possible values: true or false
    • Enables or disables the action. You can also do so by selecting an action and pressing Ctrl + E.
    • Available for all actions except the Separator action.
    Repository item

    • Possible values: A reference to a repository item
    • The repository item the action targets.
    • Available for all actions that target repository items.
    Use logging

    • Possible values: Default, true, or false
    • The property controls whether the action is added to reporting, or not
    • The ‘Default’ value is specified in the Studio settings
    • The default value is ‘true’ which means that the action item is logged
    • Available for all actions except the Separator action, which is always logged.

    Action-specific properties

    Action-specific properties define behavior that applies only to particular action types.  There are more than 60 action-specific properties. Most of them are self-explanatory in the context of the respective action, so we are only describing the more complex ones below.

    Action

    Selection of match operator for validate action and selection of report action for report action.

    Action spot

    Determination of the action spot for mouse action and touch action. The action spot specifies the location within the corresponding UI-element and can be bound to a variable.

    App archive path

    ‘.ipa’ path of the iOS application to be deployed by ‘Deploy iOS app’. The value can be bound to a variable.

    App ID

    App ID of iOS application to be deployed by ‘Deploy iOS app’. The value can be bound to a variable.

    Arguments

    Optional arguments for actions ‘Run application’ and ‘Open browser’. Value can be bound to a variable.

    Attribute name

    Name of the corresponding attribute of actions ‘Get value’ and ‘Set value’. Selection-dependent on applied UI-element.

    Attribute value

    Attribute value to be set by ‘Set value’. Value can be bound to a variable.

    Browser name

    Selection of current browsers available for ‘Open browser’. Value can be bound to a variable.

    Capture regex

    An optional regular expression for string manipulation of ‘Get value’ action.

    Category

    Selection of report category. The default value is ‘User’. Report category can be customized. Applicable for ‘Report’ action type.

    Clear cache

    Command field with values true, or false for clearing cache storage for ‘Open browser’ action. The default value is false. Can be bound to a variable.

    Clear cookies

    Command field with values true, or false for clearing cookies for ‘Open browser’ action. The default value is false. Can be bound to a variable.

    Close grace period

    The time period for ‘Close application’ action after which the corresponding application process will be killed when regular application closing has failed. Not active if the value is ‘0’. Not active if ‘Close Method’ is ‘KillProcess’. Value can be bound to a variable.

    Close method

    Closing method for ‘Close application’ action. Values can be either ‘CloseWindow’, or ‘KillProcess’. Selection influences action property ‘Close grace period’.

    Delta

    Wheel delta of ‘Mouse wheel’ action. The default value is ‘120’. Value can be bound to a variable.

    Disable bounds warnings

    Command field enabling or disabling the ‘out of bounds’ warning in a report. The default value is true. Value can be bound to a variable. Property applicable for ‘Mouse’, ‘Touch’ and ‘Swipe gesture’ actions.

    Distance

    The distance value of ‘Swipe gesture’. Predefined values of 250, 100, 1, 0.5, 0.1. Value can be set to any value. Value can be bound to a variable.

    Endpoint

    The field for an endpoint of ‘Run mobile app’, ‘Deploy Android app’ and ‘Deploy iOS app’ actions. Value can be bound to a variable.

    File name

    Name of executable with storage path for ‘Run application’ and ‘Deploy Android app’ actions. Value can be bound to a variable.

    Image-based

    Specification properties for image-based automation. Applicable for ‘Mouse’, ‘Touch’, ‘Swipe gesture’ and ‘Mobile keypress’ actions. Introduced and explained in chapter ‘Image-based automation’.

    Incognito mode

    Command field with values true, or false for incognito mode operation for ‘Open browser’ action. The default value is false. Can be bound to a variable.

    Instrument APK

    Field to hold true or false for APK instrumentation of ‘Deploy Android app’ action. The default value is true. Value can be bound to a variable.

    Instrumentation options

    Grouped instrumentation options for ‘Deploy Android app’ action.

    Instrumentation settings

    Grouped instrumentation settings for ‘Deploy iOS app’ action.

    Key

    The field for storing the pressed key on the corresponding mobile. Value can be bound to a variable.

    Key action

    Field to store key action for ‘Key shortcut’ action. Possible values are ‘Up’, ‘Down’ and ‘Press’.

    Key code

    Key code for Key shortcut’ action.

    Key data

    Key data for Key shortcut’ action. Value can be bound to a variable.

    Key sequence

    The stored key sequence for ‘Key sequence’ action. Value can be bound to a variable.

    Kill existing

    Field with value false (default), or true of ‘Open browser’ action. If set to true, any open instance of the corresponding browser will be killed prior to starting the new browser. Value can be bound to a variable.

    Long touch duration

    The timespan in ‘s’ of a ‘Touch’ action between the ‘Down’ and ‘Up’ event of a ‘LongTouch’ event. Only affects touch events of type ‘LongTouch’ and will be ignored if the different event type is set. Option to be bound to a variable.

    Mask sequence

    Field with value true or false of ‘Key sequence’ action. If true, the content will be masked during output. Default value false. Value can be bound to a variable.

    Mask value

    Field with value true or false of ‘Set value’ action. If true, the content will be masked during output. Default value false.

    Match name

    The matching name refers to the attribute which is to be matched within a ‘Validate’ action. The value can be bound to a variable.

    Match value

    The match value refers to the reference information of the ‘Validate’ action which is matched against the content of the match name (i.e. attribute). The value can be bound to a variable.

    Message

    The field belongs to the ‘Validate’ action and the three different ‘Report’ actions. The message is displayed within the report instead of the default message text. Value can be bound to a variable.

    Mouse action

    Field refers to possible actions (up, down, click, double-click, move) of mouse action.

    Mouse button

    Field refers to possible mouse buttons involved in the current mouse action.

    Move duration

    The field for holding the timespan between the position update event of a ‘Move’ event. Only affects touch events of type ‘Move’ and will be ignored if a different type is set. Value can be bound to a variable.

    Movetime

    The default time of mouse movement action. Predefined values of 100ms, 1s, 10s, 30s. Value can be bound to a variable.

    Orientation

    Field with values ‘Vertical’ and ‘Horizontal’ of mouse wheel action and field with values ‘Portrait’, ‘PortraitUpsideDown’, ‘LandscapeLeft’, ‘LandscapeRight’, or option to bind to a variable of ‘Device orientation’ action.

    Pointer ID

    The ID of the pointer for ‘Touch’ action. The default value is 0. Only affects touch events of type ‘Start’, ‘Move’ and ‘End’. For all other, the default pointer will be used. Some technologies don’t support different pointers and will ignore this attribute.

    Presstime

    Presstime for key sequence and key shortcut action. Pre-defined values of 100ms, 1s, 10s, 30s. Option to insert a user-defined value.

    Report level

    Definition of report level for report actions. Predefined report levels ‘Debug’, ‘Info’, ‘Warn’, ‘Error’, ‘Success’ and ‘Failure’.

    Report level on failure

    Specification of report level for validation action which will be raised in case of validation failure. The default value is ‘Failure’

    Report level on success

    Specification of report level for validation action which will be raised in case of validation success. The default value is ‘Success’

    Report screenshot

    Field to specify if a screenshot shall be reported for validation action. Possible options are ‘Never’, ‘OnFail’, ‘OnSuccess’ and ‘Always’.

    Restart app

    Field with value true (default), or false for ‘Run mobile app’ action. Value can be bound to a variable. If set to true, the app chosen in the ‘Startup arguments’ field gets reset before starting it.

    Run maximized

    Field with value false (default), or true of ‘Open browser’ and ‘Run application’ action. If set to true, the corresponding application runs in maximum size window mode.

    Scan code

    A numeric field for ‘Key shortcut’ action. The hardware scan code for the key. Specify DefaultScanCode to use the default scan code for the specified virtual key.

    Set modifier

    Field with value true (default), or false of ‘Key shortcut’ action.

    Start location

    Starting location of ‘Swipe gesture’ action. Predefined values and option to set the value numerically. Value can be bound to a variable.

    Startup arguments

    Optional startup arguments for ‘Run mobile app’ action. Value can be bound to a variable.

    Steps

    A numeric field for ‘Swipe gesture’ action. Value can be bound to a variable. Sets the number how often the specific swipe gesture gets executed.

    Swipe direction

    Degree value specifying the swipe direction of ‘Swipe gesture’ action. Value can be bound to a variable.

    Swipe duration

    Swipe duration in ms for ‘Swipe gesture’ action. Value can be bound to a variable.

    Text

    Header text of ‘Separator’ action.

    Timeout

    Time field for ‘Deploy Android app’ action. Value can be bound to a variable. Sets the timeout for deploying an app. The required time depends on your application size and the deploy method. Deploying an app takes longer when deploying via a network.

    Touch duration

    Time span between the ‘down’ and ‘up’ event of a ‘Touch’ action event. Only affects touch events of type ‘Touch’ and will be ignored if the different event type is set. Value can be bound to a variable.

    Touch type

    The type of ‘Touch’ action event. Possible values are ‘Touch’ (down+delay:touchduration+up with pointer 0), ‘DoubleTap’ (down+up+down+up with pointer 0), ‘LongTouch’ (down+delay:longtouchduration+up with pointer 0). ‘TouchStart’ (down with pointer:pointerid), ‘TouchMove’ (delay:moveduration+locationupdate with pointer:pointerid) and ‘TouchEnd’ (up with pointer:pointerid)

    URL

    Browser URL for ‘Open browser’ action. Value can be bound to a variable.

    Variable name

    An optional variable name for holding the requested value of ‘GetValue’ action.

    Wait action

    Type of waiting action for ‘Wait for’ action. Possible values are ‘NotExists’, ‘Exists’, ‘AttributeEqual’, ‘AttributeNotEqual’, ‘AttributeContains’ and ‘AttributeNotContains’.

    Wait timeout

    Waiting time in ms for ‘Wait for’ action. Value can be bound to a variable.

    Working directory

    Optional working directory for ‘Run application’ action. Value can be bound to a variable.