Mobile Test Automation Using Appium Python | Devstringx

Mobile Test Automation Using Appium Python

Mobile Test Automation Using Appium Python | Devstringx

With the following steps, you can setup Appium in Pycharm

Step 1: Install Python

  1. Go to the link https://www.python.org/downloads/
  2. Download the latest version for windows
  3. Add Python path in a user variable

Step 2: Install Pycharm Community Edition

  1. Go to the link “https://www.jetbrains.com/pycharm/download/#section=windows
  2. Download community edition for windows

Step 3: Install Node JS

  1. Go to the link “https://nodejs.org/en/
  2. Download most recommended user version for windows

Step 4: Install Appium Desktop App

  1. Go to the link “https://github.com/appium/appium-desktop/releases/tag/v1.21.0
  2. Download the latest version for windows

Step 5: Install Appium through Command Line

  1. Open Command Line and Type npm install -g appium
  2. Check version npm -v

Step 6: Install Android Studio

  1. Go to the link “https://developer.android.com/studio
  2. Download latest version for windows
  3. Configure System variables

Step 7: Create Virtual Device

  1. Select Pixel device from phone
  2. Download Android version 11
  3. Launch the emulator

Appium Test Creation:

  1. Create Project ’AppiumProject’ in Pycharm
  2. Download appium package by pip install Appium-Python-Client
  3. Create Python File as FlipkartTest
  4. Write the sample code to launch Flipkart app

from appium import webdriver

desired_caps = {

“deviceName”: “Pixel 3a XL API 29”,

“platformName”: “Android”,

“version”: “10”,

“udid”: “emulator-5554”,

“app”: “D:\\AppiumProject\\app\\flipkart.apk”

}

driver = web driver.Remote(“http://localhost:4723/wd/hub”, desired_caps)

Appium Test Execution:

  1. Launch the emulator
  2. Start Appium Server
  3. Run your FlipkartTest.py file
Read:- Accessibility Testing: Need, Benefits, and Types

Share this post