Create UI Identifiers
Testsigma provides a UI Identifiers page which is helpful for the testers to manage UI Identifiers while avoiding duplicates and without modifying the Test Scripts directly.
Prerequisites
Appium and XCode installed and configured for automation of iOS Apps.
Please refer the following article for more details - Configuring your Mac and iOS device for Hybrid Test Execution
Navigation
We can navigate to the UI Identifiers page by going through:
Applications > Select Application > Select Version > UI Identifiers
The landing page looks as given below:
On the top right corner, we can see three buttons. They are:
- Import: Use this option to import UI Identifiers from an Excel or JSON file. Please check this article for more details - How to Import UI Identifiers?
- Copy from Other Version: Use this option to copy the UI Identifiers from another Version of the same Application in Testsigma. Please check this article for more details - How to Copy UI Identifiers from one Application Version to another?
- Create: We will be discussing creation of UI Identifiers in the following section.
Creating UI Identifiers - without Advanced Options
Clicking on the Create button on the top right corner opens the Create UI Identifier page with the input fields mentioned below.
Enter the details as given below:
Name: Enter the name that is used for UI Identifier.
Screen Name: Screen Name will be helpful to group you identifiers by each screen in your application. This helps to you search identifiers in each screen in your application.
Advanced Options: Use advanced options to create an XPath or CSS Selector interactively using the Testsigma UI Identifier creator. Please check the following article for a detailed guide on using Advanced Options - How to create UI Identifier with Advanced Options?
Identifier Type: Select the suitable locator from a drop-down box:
- XPath
- CSS
- id
- name
- link text
- partial link text
- class name
- tag name
UI Identifier: Enter the value for the UI Identifier type you previously selected. Check the following section Getting UI Identifier using Appium Inspector to know how to get the UI identifier for your iOS App using Appium's built-in Inspector.
Finally, click on Create button to finalize the creation. You can see the success notification for the newly created UI Identifier.
Getting the UI Identifier using Appium Inspector
Assuming the prerequisites as given in the above Prerequisites section are satisfied, we can start the Inspection as follows:
1. Connect your iOS Device.
2. Open Terminal on your Machine.
3. Open iTunes and make sure your device is shown there.
4. Start the Appium Server if not already running.
5. Start the UI Inspector session by clicking on Start new session in the top right corner.
6. The Appium Inspector will start up and will start loading a screenshot from the connected iOS Device.
7. Click on the required Element and copy the UI Identifier(resource ID, XPath e.t.c) from the right panel.
8. Paste the UI Identifiers in the Create UI Identifiers page and Click on Create.
9. Perform the required actions such as Tap, Click, or Drag on the device and select the next Element in the Inspector.
10. Repeat Steps 7 to 9 till you get all the required UI Identifiers.
Here's a short video depicting the steps(Appium Inspector started and kept running in the background):