天天看點

Appium自動化部署及連接配接Appium服務

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
)