How do we find the locators in Appium?
Steps to find the locators
Install the Appium for desktop from http://appium.io/downloads.html
Make sure mobile emulator is up and running.
Open the Appium app and start the server
Go to File -> New Session Window
Under Automatic Server enter Desired Capabilities (here we are trying to find the xpath of Google calculator application) as mentioned in the screenshot
{
"deviceName": "Pixel_2_XL_API_27",
"uuid": "emulator-5554",
"appPackage": "com.android.calculator2",
"appActivity": "com.android.calculator2.Calculator",
"platformName": "Android"
}
Click on Start Session. It may take few seconds to start
Now click on example 2 or 3 to get the locator details
On the right hand side, FindBy Id and xpath should be displayed.
You may save the Desired Capabilities for future use.
After saving
No comments:
Post a Comment