Appium自動化部署:
1)安裝appium桌面程序安裝:超鏈接
2)安裝客戶端
pip install appium-python-client
3)安裝服務器
安裝 Nodejs
4)連接appium服務
# 連接appium
# appium服務器地址
command_executor = "http://127.0.0.1:4723/wd/hub" #默認
# 所需能力:http://appium.io/docs/cn/writing-running-appium/caps/index.html
desired_capabilities = {
"platformName": "Android",
"platformVersion": "7",
"deviceName": "android",
"newCommandTimeout": "60000",
"noReset": False,
"unicodeKeyboard": True,
"resetKeyboard": True,
"appPackage": "apk包名",
"appActivity": "對應apk包的activity",
}
driver = webdriver.Remote(
command_executor=command_executor,
desired_capabilities=desired_capabilities
)
