Appium+Python????????????????
?????bacon?? ???????[ 2017/4/20 14:51:18 ] ????????????????? Python
????????? ????
????1.1 ???????
?????????????Appium???????豸?????Native????????Hybrid???????Web??Mobile Web?????UI???????????????????????????????????????ο???
????1.2 ??????
????????????????????????????????????
????????? ????
????2.1 Appium??????
????????????????????????±??????????app??
??????????????????????????????????????????????????????κ??????????????????????????????????????????????????
?????????????????????????????·????????????д?????????api??????webdriverЭ?????api??????????????????????????
????????????????????????????
????2.2 Appium????????C/S ????
????Appium???????????????????REST API??Server?????server??????????????????????????????client????????????command??????????Щcommand??????Щcommand???????豸????????????????????豸?????????豸???????Щcommand?????н???????server?? server?????н???????client??
????client?????command???豸???????????????????е?????????appium??????????????????????????client???????????Щ?????????java/ruby/python/js????????????webdriver???Э??????
??????????????????????Щ?????
????1?????????????
????2?????server???????????????????????
????
?1 Appium???
?????2 Appium Android???
?????3 AppiumiOS???
????2.3 Appium Server/Client
????Appium Server??????????????Appium??????????豸???????webdriverapi?web?????????????????????????Appium??????????appium client?????????????ruby/java/python???
????2.4 ??Session
??????webdriver/appium?????в??????????Appium Server??????豸?????????Session??????????С????????????POST/session???URL?????????????Desired Capabilities????????????????????????????????ID??session id????????????е???????????ID?????ID?????????????????????????????豸???????????????л?????????豸?????????????豸???????ID???????????????????????????????????????????????豸????????????????
???????????Desired Capabilities???????????????????key-value??????????????????java???map??python??????ruby???hash???javascript???json??????????Appium Server??????豸??????????????json??????
?????????? Appium???
????Appium Windows??????Android?豸?????????Appium Mac???????Android??iOS?豸?????????
????3.1 Windows?氳???64λ??
????3.1.1 ????б?
????1??JDK> 1.6
????2??vcredist_x86_c++
????3??.Net Framework > 4.0
????3??Android Developer Tools??ADT-Bundle-windows-x86-64??
????4??Appium for windows???°?1.4.16.1??
????5?? Appium client???????????????????????Java/Python/Ruby?????????Java???????????Selenium??selenium-java-2.46.0.jar ?? selenium-server-standalone-2.46.0.jar??python????Appium-python-client???????python???
????6??Android?????????for windows????windows????????????Android?????????????adb?????????豸??
????3.1.2 ???????
????????JDK??vcredist_x86_c++??.NET Framework??Appium??????????????ADT???????????????譎?
????1??JDK???????????????????JAVA_HOME?JDK???·??????Java????????????????????а???
????2??vcredist_x86_c++????????????vcredist_x86_c++.exe??????????????ɡ?
????3??.NET Framework???????????????4.0?汾??.NET Framework.exe??????????????ɡ?
????4??Appium??????????????Appium for windows 1.4.16?汾???????????ɡ?(???Appium?????????????????????Appium????????????GUI?汾?????汾??GUI?汾?????????????湤??????汾?????????????????????????????????python??java??ruby??????????????)
????5??ADB?????ADB??ADT???????????????????????ADT????????????????????ɡ??????????????????ANDROID_HOME?ADT????????????D:Mobile-AutoTest-Softwareadt-bundle-windows-x86_64-20130917sdk???????????ADT???tools??platform-tools?????????????? Path·???????adb??????adb???????????????????adb?????????????????????????????
????adb?????????????????adb devices????PC????????豸??udid
????6??python??????????python2.7?????????????????ɡ??????????python???????python?????????pypa-setuptools??pip??????
????6??Appium????????????Appium Client?????????譎??????????Python?????Java?????????python?????
????1??????????Python??pypa-setuptools??pip??Python????(??????????а??)????????pip?????PC???????????Selenium??Python??????cmd???л???Python?????C:Python27Libsite-packages????У???
????python pip install Selenium
????python pip install Appium-Python-Client
????2?????????????????Python???????????Path·????
????С?????
???????Appium-Python-Client???????????????setuptools?汾????????python pip install –upgrade setuptools????????????
??????????????????????Selenium??Appium-Python-Client??????????????????Python????????????C:Python27Libsite-packages ???£??????????selenium-2.53.1????py????selenium?????????????site-packages????
????Java?????????????Jar????????java-client-3.2.0.jar??????Java?????????Jar???ɡ?
????????????????????
??????????????譎????????????????????????????Appum????д????APP·????Platform?Android??Automation Name?Appium??PlatformVersion?????????Android?汾???DeviceName???????adb???????????udid???Server??????????????
?????????????????????????????????????????????????????????
????3.2 Mac?氳?
????3.2.1 ????б?
????Mac Pro ??OS X 10.10.3??
????JDK > 1.6
????Appium for Mac???°?Appium-1.4.13.dmg??
????Xcode 7.X
????Appium Client??Python??Java?????????Java???????????Selenium??selenium-java-2.46.0.jar ?? selenium -server-standalone-2.46.0.jar
????3.2.2 Appium???????
???????brew :???????ruby –e "$(curl –fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
???????node.js:??????http://nodejs.org????Mac??pkg????????????????????????????????κβ??????????????node –version ???а汾???????????????(????????brew?????????brew install node)
???????????sudo chmod –R 777 /usr/local/
???????ideviceinstaller??brew update ??brew install ideviceinstaller
???????Appium??????npm install –g appium@1.4.16??npm install wd(??????????????£?www.15yan.com/story/4GbuTwXQKDU/)
???????pip??sudo easy_install pip?С?
???????appium python client??selenium(?????):pip install Appium-Python-Client??pip install selenium
?????????Windows??????£?JDK??????????а???python?Mac??Linux????????????????????????????JAVE_HOME??ANDROID_HOME?????????ADT???platform-tools??tools?????????
?????????Appium-doctor??黷?????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11