Appium+eclipse+python Environment Configuration

Source: Internet
Author: User
Tags appium

1. Install the Android development environment (lots of tutorials, not fine writing) 2. Install Eclipsedownload Eclipse, unzip it 3. Install Python: https://www.python.org/downloads/release/python-2713/download file: Python-2.7.13.msiConfigure Environment variables: add "E:\python;" In Path 4. Eclipse's Pydev plug-in installationpydev Download: Download and Python similar to the corresponding version, if the plugin installed 3.x version, there may be problems, so offline download 2.x version of the go to install (via eclipse--> help-->install new Software to install the latest version, there may be problems, so choose to install offline)pydev Download: https://sourceforge.net/projects/pydev/files/pydev/(download Pydev 2.8.0)or direct Baidu search download http://download.csdn.net/download/tterminator/9669211A more casual way is to extract the plugins inside the package into the Eclipse installation directory corresponding to the directory, features directory is the same operation. But if you don't want to mess with the original version of Eclipse, you can choose to do the following:Create a new links folder under the Eclipse installation directory. Then, under the Links folder, create a new directory called Eclipse, and finally extract the contents of the Pedev.zip compressed package into the Eclipse directory. under the Links directory, create a new file named Pydev.link, with the contents of the file: Path=c:\itdevelop\eclipse\links\eclipse, where path=c:\itdevelop\ Eclipse is the installation directory for Eclipse)after that, you can restart eclipse. How do I check if Pydev is properly installed? Open the Eclipse–>windows–>preferences and find the Pydev option in the tree structure to the left. 5, installation python-client
with Appium, you usually need to use a language client, and if you use Python, you need to install Python_clientDownload Install Python installation tool: Http://pypi.python.org/pypi/setuptools can find the correct version to download. Win7 32-bit can download setuptools-0.6c11.win32-py2.7.exe. Note: The Win7 64-bit must be installed using ez_setup.py. By downloading ez_setup.py, CMDCD to ez_setup.py directory, execute python ez_setup.py and install setuptools automatically. 6. Install appium python client Download Python-client-master.zip package,: Https://github.com/appium/python-clientunzip after download, in cmd command line CD to Python-client-master directory, this directory contains setup.py fileEnter the Python setup.py install command after entering the client 7. Import the Python development environmentIf you want Eclipse to be able to write Python normally, you also need to import the Python development environment, you will be prompted to project interpreter not specified when you do not import the newEclipse Menu Window---Preferences "PyDev" Interpreter-python "New, select Python.exe, etc. import complete. 8. New Python project in Eclipseopen Eclipse, select "File" in the menu, "new" Other "Pydev project" Enter project name, run IDE Select version according to build environmentCreate package under Project (new project, right-click New "PyDev package")Create module under Package (right-click New PyDev module) 9, a small instance, you can run to see
#Coding=utf-8 fromAppiumImportWebdriverdesired_caps={}desired_caps['PlatformName'] ='Android'desired_caps['platformversion'] =' at'desired_caps['devicename'] ='192.168.131.101:5555'desired_caps['Apppackage'] ='Com.android.calculator2'desired_caps['appactivity'] ='. Calculator'Driver= Webdriver. Remote ('Http://localhost:4723/wd/hub', Desired_caps) driver.find_element_by_name ("1"). Click () driver.find_element_by_name ("5"). Click () driver.find_element_by_name ("9"). Click () driver.find_element_by_name ("Delete"). Click () driver.find_element_by_name ("9"). Click () driver.find_element_by_name ("5"). Click () driver.find_element_by_name ("+"). Click () driver.find_element_by_name ("6"). Click () driver.find_element_by_name ("="). Click () driver.quit ()

  

Appium+eclipse+python Environment Configuration

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.