代码
from appium import webdriver
desired_caps={
"platformName":"android",
"platformVersion":"10",
"deviceName":"emulator-5556",
"appPackage":"com.android.dialer",
"appActivity":".main.impl.MainActivity",
"noReset":True
}
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub",desired_capabilities=desired_caps)
配置参考:http://appium.io/docs/en/writing-running-appium/caps/index.html