Tuesday 29 June 2021

Appium setup Android

All QA like to automate Mobile app, It has different challenges and multiple constrains , Lets crack 1st step and install Appium for android.... Anyone who want to learn mobile automation, below steps are helpful Prerequisites Minimum 8gb ram, 64bit windows, Admin access-if you are working under proxy Software's Java, Node, Eclipse, Selenium, Android Studio, Appium Server, Appium Jars Steps to follow 1. Download Java and Set JAVA_HOME in Env Variable 2. Download Android Studio from below url, https://developer.android.com/studio#downloads for Windows 64 bits 3. Set ANDROID_HOME -SDK location -Addressusers\AppData\local\Android\SDK Above folder is hidden, you need to do it manually 4. Using Android Studio- configure Emulator - C:\Program Files\Android\Android Studio\bin -Open studio 64 and Configure Emulator from Tool tab- AVD 5. Download NODE , Set Node in Env variable 6. Download Appium server 7. Download Appium Jars 8. Install eclipse and add external jars of appium and selenium java  9. Start Appium server and run code with capabilities(include Device ID and APK path) You need to have some .apk file and add the path in your code below and also Emulator name which you created at step 4 Code to launch APK public class base { public static AndroidDriver capabilities() throws MalformedURLException { AndroidDriver driver; // TODO Auto-generated method stub File appDir = new File("src");    File app = new File(appDir, "Test.apk");    DesiredCapabilities capabilities = new DesiredCapabilities();        capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "EmulatorName");    capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());   driver = new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);         } I know its not easy to setup as mentioned, If google not help you, please reach out to me :) #happylearning #android #Appium #mobileautomation #selenium #automationtesting