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



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


回溯(最近一次调用(: 文件"login.py",第 19 行,在设置 self.driver = webdriver。Remote('http://localhost:4723/wd/hub', desired_caps( 文件 "C:\Python27\lib\site-packages\appium\webdriver\webdriver.py",第 36 行,ininitsuper(WebDriver, self(。init(command_executor, desired_capabilities, browser_profile, proxy, keep_alive( 文件 "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py",第 98 行,在initself.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(response( 文件"C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py",第 193 行,第 check_response 行 提高exception_class(消息、屏幕、堆栈跟踪( Web驱动程序异常: 消息: 无法创建新会话。(原始错误:com.app./。Activities.StartActivity 从未启动。当前: com.app./.活动.登录.登录活动(


你想要什么能力?

尝试指定

"appWaitActivity": "*"在您想要的功能中,

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

最新更新