【问题标题】:Android automated test cases in python using appium framework使用appium框架在python中的Android自动化测试用例
【发布时间】:2017-12-21 04:59:05
【问题描述】:

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


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


【问题讨论】:

    标签: python automation appium


    【解决方案1】:

    你想要的能力是什么?

    尝试指定

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

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

    【讨论】:

      猜你喜欢
      • 2014-01-31
      • 2016-06-05
      • 2013-02-03
      • 2016-08-23
      • 2014-08-03
      • 1970-01-01
      • 2014-05-11
      • 1970-01-01
      • 2011-06-26
      相关资源
      最近更新 更多