首页 > 学院 > 开发设计 > 正文

WebDriverException: Message: A new session could not be created.

2019-11-06 06:32:56
字体:
来源:转载
供稿:网友

Initially, I had set desired capabilities to:

desired_caps['platformName'] = 'Android'desired_caps['platformVersion'] = '4.4'desired_caps['deviceName'] = 'Moto E'desired_caps['appPackage'] = 'atpwta.live'desired_caps['appActivity'] = '.activity.Main'

After reading the appium docs I solved the issue by adding the following line.

desired_caps['appWaitActivity']= '.activity.root.TournamentList'

So why did appWaitActivity help?

A simplified (but technically incorrect) way of understanding this error is that Appium was waiting for a screen name .activity.Main and timed out. The error helpfully tells you the current active screen is .activity.root.TournamentList. The desired capability appWaitActivity tells Appium what Android activity it should wait for. If you see a similar error, set your appWaitActivity to match the current activity in the error message.


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表