使用appium框架的python中的Android自动化测试用例

时间:2017-07-16 16:40:04

标签: python automation appium

这是在尝试在python中执行测试用例时出现的cmd错误消息中的文本。 第19行中的错误:设置功能中 self.driver = webdriver.Remote('http://localhost:4723/wd/hub',desired_caps)

追踪(最近一次通话):   在setUp中输入第19行“login.py”     self.driver = webdriver.Remote('http://localhost:4723/wd/hub',desired_caps)   文件“C:\ Python27 \ lib \ site-packages \ appium \ webdriver \ webdriver.py”,第36行, init     super(WebDriver,self)。 init (command_executor,desired_capabilities,browser_profile,proxy,keep_alive)   文件“C:\ Python27 \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py”,第98行, init     self.start_session(desired_capabilities,browser_profile)   在start_session中的文件“C:\ Python27 \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py”,第185行     response = self.execute(Command.NEW_SESSION,参数)   文件“C:\ Python27 \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py”,第249行,执行     self.error_handler.check_response(响应)   在check_response中的文件“C:\ Python27 \ lib \ site-packages \ selenium \ webdriver \ remote \ errorhandler.py”,第193行     提出exception_class(消息,屏幕,堆栈跟踪) WebDriverException:消息:无法创建新会话。 (原始错误:com.app。/ .Activities.StartActivity从未开始。当前:com.app。/。Activities.Login.LoginActivity)

1 个答案:

答案 0 :(得分:1)

你想要的能力是什么?

尝试指定

' appWaitActivity':' *'在你想要的能力,

它将启动您的应用程序,然后您可以在appium日志中找到启动的确切活动,然后您可以用找到的活动名称替换*。

相关问题