Skip to main content

Python client for Appium 1.0

Project description

Appium Python Client

An extension library for adding Selenium 3.0 draft and Mobile JSON Wire Protocol Specification draft functionality to the Python language bindings, for use with the mobile testing framework Appium.

Getting the Appium Python client

There are two ways to install and use the Appium Python client.

  1. Install from PyPi, as ‘Appium-Python-Client’.

    pip install Appium-Python-Client
    
  2. Install source from PyPi, as ‘Appium-Python-Client’. Download and unarchive Appium-Python-Client-0.2.tar.gz, then run

    python setup.py install
    
  3. Install from GitHub.

    git clone git@github.com:appium/python-client.git
    cd python-client
    python setup.py install
    

Usage

The Appium Python Client is fully compliant with the Selenium 3.0 specification draft, with some helpers to make mobile testing in Python easier. The majority of the usage remains as it has been for Selenium 2 (WebDriver), and as the official Selenium Python bindings begins to implement the new specification that implementation will be used underneath, so test code can be written that is utilizable with both bindings.

To use the new functionality now, and to use the superset of functions, instead of including the Selenium webdriver module in your test code, use that from Appium instead.

from appium import webdriver

From there much of your test code will work with no change.

As a base for the following code examples, the following sets up the UnitTest environment:

# Android environment
import unittest
from appium import webdriver

desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '4.2'
desired_caps['deviceName'] = 'Android Emulator'
desired_caps['app'] = PATH('../../../apps/selendroid-test-app.apk')

self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
# iOS environment
import unittest
from appium import webdriver

desired_caps = {}
desired_caps['app'] = PATH('../../apps/UICatalog.app.zip')

self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

For the added functionality, over Selenium WD, see the Appium Python Client GitHub

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Appium-Python-Client, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size Appium-Python-Client-0.2.macosx-10.9-intel.exe (78.6 kB) File type Windows Installer Python version any Upload date Hashes View
Filename, size Appium_Python_Client-0.2-py2.7.egg (30.6 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size Appium-Python-Client-0.2.tar.gz (8.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page