Recently feel appium quite fire, read some information, originally want to use NPM online installation, meet various problems, first simply say:
Use command in cmd window: npm install-g appium Install, Report no Python error, OK, download python (environment variable autoconfiguration), I download is 3.3, also hint Python version is wrong, according to prompt, need 2.5 to 3.0 version, downloaded Python2.7,ok, has not prompted error, Haha, is happy, reported the following error:
It looks like a C + + compiler is needed, the online check of the information, windows7&windows8&windows8.1 need to install: Microsoft Visual Studio C + + 2012
Microsoft Visual Studio C + + for Windows Desktop (Express version works well)
Think about it or forget it, and give up the online installation.
Above are some of the problems encountered, specifically installing Microsoft Visual Studio C + + 2012 can not succeed, I did not try, feel a little waste of time and energy
Okay, here we go.
Step One: Install the JDK, Eclipse, Android SDK, which I will not say in detail
Step Two: Install node, download path: https://nodejs.org/download/, currently the latest is my v0.12.7, is a 64-bit system, download. msi 64-bit Package
Step three: Install appium,:https://bitbucket.org/appium/appium.app/downloads/, the current latest is: 1.4.0.0, sometimes can not download the situation, I share the cloud disk, Link:/http PAN.BAIDU.COM/S/1I3ZVNVJ Password: Jtaj, installed after the direct double-click the desktop icon to run, some people in accordance with the web said in the cmd window run appium and Appium-doctor command is not recognized, because, there is no configuration environment variables, Add the path of the Appium.cmd file in the Appium installation directory to the system variable, for example my: D:\Appium\node_modules\.bin (remember to configure the system variable restart CMD window, otherwise the configuration does not take effect), This time you can enter Appium and appium-doctor in cmd:
Step four, start Eclipse, create a new Java project, download the sample Android package and sample code from GitHub
Example program: https://raw.githubusercontent.com/appium/sample-code/master/sample-code/apps/ContactManager/ContactManager.apk
Create a new class file in the Java project and copy the sample code to remember to change the package name and class name
4
There is still a lot of error because we are missing the jar package and we need 3 jar packages: Selenium server jar package, selenium client jar package, Appium client jar Package
Appium Client:https://search.maven.org/remotecontent?filepath=io/appium/java-client/3.1.0/java-client-3.1.0.jar
Selenium
Selenium Server V2.46.0:http://selenium-release.storage.googleapis.com/2.46/selenium-server-standalone-2.46.0.jar
Selenium client V2.46.0:http://selenium-release.storage.googleapis.com/2.46/selenium-java-2.46.0.zip
Import the jar package into the Java project when the download is complete
All the red forks are gone, put the APK program into the project below, and change the Java code
Connect Android Phone (I don't use simulator), start Appium, right-click Debug As->junit Test in Java project, wait for the program to run
Appium This frame reminds me of the Nokia testability Driver tdriver Framework, but it only supports Saipan and Meego, but it works very well on Saipan. Appium, I think it will be more and more popular.
Appium environment Configuration and an example