Hi ! I’m new to appium , i have downloaded appium for my Mac OS X ( 10.10 . 3 ) and also the pre-requisites ( Java & command line tools & Xcode ) … i have used the path to locate the .app file … n then clicked on inspector … i want to know if i have to write a script of what should be done in the test ? … if i have to … then pls suggest a guide to write test cases … thank u in advance !!! pls pls pls help
Hi Uday, to start with use the Appium Inspector and record the script, You can see the generated script in inspector and even u can playback it, You have option with your favourite language
Welcome to Appium, which is great tool for Mobile App Automation.
how do you record it ? … i load the .app file and should i have wait for sometime ? if yes how long ? or is there specified stuff which implies that it has loaded everything … n then i click inspector ? … when do i click on inspector n how do i record ? n where will it be stored ?
- Ensure you have the app installed (same version, build) on the real device. And that device is connected to your Mac
- Launch inspector (Magnifying glass), It would automatically launch your app on the device. Wait until Appium inspector shows your device screen
- Select Record button (would turn red when selected)
- At this stage a new window would be tucked under Appium inspector. Select your preferred language (I selected Python, Add boilerplate, Xpath Only)
- Now locate the elements on top, Appium will highlight the selected button \ text \ image etc.
- Once done with your actions , goto File > Save.
- On the recorded script I added following 2 lines and saved before running
import os, sys
from selenium import webdriver - Close inspector, logout and close the app on real device.
- open Terminal. Browse to your recorded test and run it (mine was python , si i ran it as: )
python yourtestfilename.py - Enjoy