Page tree
Skip to end of metadata
Go to start of metadata

This tutorial allows you to build and execute test cases within mobile studio. You can create a test with different actions (for available actions, see Supported Commands). A test step is made up of an action and an optional Xpath. In some actions, additional text/dropdown selection can also be required. After all the steps are added you can run the test by a click of the button. Please note that we currently support Appium 7 and below.

To develop a test you'll need to Open a device in Automation Mode.

Test Editor Flow

There are these flows you can follow when you use the Test Editor.

Path Selection

  1. Select an element and copy its Xpath to the filter
  2. Click Add Step button. A dropdown will open with available actions (see Supported Commands).
  3. Select an action. A new step is added to the window. The step action is same as your selection and if applicable, the XPath text area appears having same value as filter text field.

Test Editor

  1. Click on a Test Editor button.  The Test Editor appears.
  2. Click Add Step.
  3. Click your preferred action and add an Xpath to the step if required.

Run the Test

To run the test, click Run. While the test is running, the element upon which the current step is taking action is highlighted with a red rectangle around it.

Add Step is only be enabled if there is xpath in filter input. If the filter input is empty, Add Step is disabled. 

Copying an XPath is not needed for some actions. However other steps like inserting minute and/or second or selecting an app or selecting swipe direction from dropdown might be needed.

Test Editor Actions

Active Steps are steps whose checkbox is marked true/tick.

You can perform these actions in Test Editor.

  1. Position Window -Positions test editor window in these ways. Floating and Aligned to the Right, Left, or bottom. You can change the position of the window from the position button.
  2. Documentation.
  3. Add Step - Adds a new step. When clicked a dropdown will opens from where you can select the action.
  4. Play/Pause  - Runs or pauses the test. The test will run one step at a time. Steps are executed in the same order as displayed on the screen. Only active steps are executed. 
  5. Delete - Deletes the steps. Only Active steps are deleted.
  6. Drag and Drop - Drags and drop to change the order of steps.
  7. Action Dropdown - Changes the action type from this dropdown.
  8. Locate By Dropdown - Disabled
  9. Xpath Text Area - Xpath 
  10. Application Dropdown  - Selects an application which is to be launched (applicable in Activate App only).
  11. Direction Dropdown  Selects a direction in to swipe in (applicable in Swipe Command only).
  12. Export Code - Opens the Export Code screen.

Generated Code 

When you click Export Code you see a screen with the generated code. You can select the language from the drop down above. To copy the code, click Copy. 

These languages are supported:

  • Java Junit 5
  • Java TestNG
  • Python
  • Ruby
  • C#

Exported code for activate app for grid runs on the limited version of appium lib.

  • No labels