Appium&python

Source: Internet
Author: User
Tags appium

The features described in Appium's website are fascinating, just recently in the study of mobile Automation testing, so it's interesting to explore the appium of this young tool.

But look at the official documents, is to let the beginning of I feel puzzled.

So, I can only search the limited resources on the Internet, first from running Appium provide support Python,javascript,java,ruby and other language examples began to realize appium work principle.

Here, record the process of this exploration.

The first attempt to succeed is the Python example on Mac OS.

Here, the use of appium, there are mainly four factors:

One, Appium Server

1. Installation of Appium server

Prerequisite: NODE.JS&NPM has been installed

Install: Open the shell on your Mac

#sudo NPM install-g appium//Add sudo to prevent permission problems

#npm Install WD//This is not clear what impact??

------------

Under normal circumstances, the Appium server is installed successfully.

Start:

#appium &//If the following information is displayed, Appium server started successfully! (Does not add &, can also start ~ ~ ~)

Two, Selenium Webdriver

Because it is a Python version, so go to selenium website to download Python webdriver (selenium-2.39.0.tar.gz)

Https://pypi.python.org/pypi/selenium

Extract:

#gzip-DC selenium-2.39.0.tar.gz | Tar xvf-

Installation:

#cd selenium-2.39.0

#sudo python setup.py install//sudo is still a problem to solve permission

-----------

In this way, the Webdriver is installed successfully.

Third, the app to test

The test is the TestApp provided by Appium.

First, we need to compile this app with Xcode

#cd Appium

#cd Sample-code/apps/testapp

#xcodebuild-SDK Iphonesimulator//In order to prevent conflicts between iphonesimulator and settings, no Iphonesimulator version is noted

-----------

If you see * * Build succeeded *, this testapp build succeeds.

Four, Automation Scripts

Automation scripts, also available with Appium, can be found in the Appium directory

#cd Appium

#cd Sample-code

#cd Examples/python

#python simple.py//Execute test Script

-----------

At this point, the iOS emulator will open and start executing the simple.py test script!!!

Zhuanzi:http://www.cnblogs.com/enjoytesting/p/3513637.html

Appium&python

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.