Custom Action Step is currently not supported for executions on Browserstack, Saucelabs, or Custom grids.
For more information, see Appium reference:
- Hover over the (arrow symbol) where you want to add the Custom Action step. The action options are displayed.
- Click on the “M” (Testim predefined steps). The Predefined steps menu opens.
- Expand the Actions menu and select the Add custom action step.
Alternatively, you can use the search box at the top of the menu to search for Add custom action.
- In the Name the new step field, enter a (meaningful) name for this step.
- If this is a shared step to be made available to reuse in this or other tests, keep the box next to Shared step selected (default), and choose a folder from the Select shared step folder list where you want this step stored. Otherwise, deselect the checkbox. For more information about shared steps, see Groups.
- Click Create Step. The function editor opens, and the Properties panel opens on the right-hand side.
- In the Properties panel, in the Description field, optionally edit the description of this step. The default description is “Run shared action” (or “Run action”).
- Define the parameters you will need for your step as follows:
- In the Properties panel, click the + PARAMS button.
- Element parameter: If you would like to define an element as a parameter, select Element from the dropdown list. In the AUT window, hover your mouse on the relevant element and then click on it to select it. The selected element is shown in the Target Element box in the Properties pane. If you would like to view, replace or adjust the settings for the selected element, use the procedures described in Editing Target Element Properties.
- The selected element is automatically named “param” or “element” (depending on whether you chose a JS parameter or HTML element). To assign a relevant name to the parameter/element, click on the edit icon and enter the desired name.
- Optionally fill in the following Properties:
- When this step fails – Specify what to do if this step fails.
- When to run step – Specify conditions for when to run the step. For more information, see Conditions.
- Override timeout – Allows you to override the default time lapse setting which causes Testim to register a fail for a test step, and specify a different time lapse value (in milliseconds).
- Click the back arrow to return to the main Editor window.
The step is created.
If you opened your AUT to define an element as a parameter, click on the Toggle Breakpoint button to remove the breakpoint.
The following example shows the use of the
activateApp Appium command in a Custom Action step to change the app during the test. The designated app has to be installed on the target device.
Updated 12 days ago