Modify Mobile Test Steps
Last update January 27, 2015
Follow these steps:
- Open the mobile test case that you want to update.
- To view the details of each step:
- Click the test step that you want to review.
- Click Mobile testing step in the element tree on the right to expand the details for the step.
The Mobile Testing Step tab opens and shows a screenshot of the test application. The Actions section at the top of the tab shows the individual actions that are performed in the test step.
- To view the screenshot associated with a specific action, click the action in the Actions section.
- To manually add a new action, click Add (+) in the Actions section and enter the Key/Value pair for that action.
- To rearrange the order of the actions, click the action you want to move and use the up and down arrows to move the action.
- To delete an action, click the action and click Delete.
- You can also add the following element or screen actions by right-clicking the screenshot for a recorded action:
Inserts a Back command to return to the previous screen in the application. Android only.
- Get element
Performs a Get on the selected element. The name of the selected element appears next to the Get element option.
- Tap element
Performs a Tap action on the selected element. The name of the selected element appears next to the Tap element option.
Brings up the keyboard and simulates pressing the specified keys to set the value of the text element.
Note: In some instances, the application does not display the typed values. For example, a password field might not display the entered values.
Sets the value for the selected element. The name of the selected element appears next to the Set value option.
Note: You can also use this action to set the value for a slider. For example, setting a value of 0.8 moves the slider 80% to the right. Use increments of 0.1 when setting the value for a slider. Setting a value of 0.25 is unrecognized and does not move the slider.
- Long Tap screen
Performs a long tap on the screen, as opposed to a specific element.
- Long Tap element
Performs a long tap on the selected element. The name of the selected element appears next to the Long Tap element option.
Inserts a pause in the test. You can express the wait like ThinkTime at the step level. For example, 1s-10s inserts a random pause between 1 and 10 seconds. 100z inserts a pause of 100 milliseconds.
Lets you insert a comment for a specific action. The comment performs no action, it is for documentation only.
Lets you insert an arbitrary beanshell script. Typically, this script does not interact with the device or simulator. This action provides the means of inserting a custom assertion.
- Change Orientation
Changes the orientation of the device.
Performs a shake gesture on the device.
- Go to background
Performs the action of pressing the home button. This action forces the application to the background for 10 seconds and then brings it back. This action is useful for testing because it typically forces the application to release memory and stop any CPU-intensive work. iOS only.
For more information, see Add an Assertion to a Mobile Test Step.
Lets you write and run a script to perform a customized function or procedure. Right-click a step in the test pane and select Add step after..., Custom Extensions, Execute script (JSR-223). See Execute Script (JSR-223) Step for more information.
: When scripting with Appium, use the _webDriver variable. This variable is a reference to the
(public interface) object that is associated with the test when it is active in a running session (that is being recorded) or when it is played back. Because of this, the Test button at the bottom of the dialog results in an error when clicked.
- Click Save.
Was this helpful?
Thank you for your feedback.