import os
from selenium import webdriver
PATH = lambda p: os.path.abspath(
os.path.join(os.path.dirname(__file__), p)
)
desired_caps = {}
desired_caps['deviceName'] = 'Android'
desired_caps['platformName'] = 'Android'
desired_caps['browserName'] = ''
desired_caps['version'] = '4.4'
desired_caps['app'] = ''
desired_caps['app-package'] = 'com.storm.smart'
desired_caps['app-activity'] = 'StormApplication'
driver = webdriver.Remote('http://localhost:4723/wd/hub',desired_caps)
错误信息:
selenium.common.exceptions.WebDriverException: Message: u"A new session could no
t be created. (Original error: No app set; either start appium with --app or pas
s in an 'app' value in desired capabilities, or set androidPackage to launch pre
-existing app on device)"