appium创建session失败:selenium.common.exceptions.WebDriverException: Message: A new session could not be

       记一个项目中遇到的坑,无法创建一个新的回话,因为启动的activity从来没有被启动

具体的报错信息如下:selenium.common.exceptions.WebDriverException: Message: A new session could not be created. (Original error: com.hz.farmstore/com.hz.discount.control.welcome.WelcomeJumpurl never started. Current: com.hz.farmstore/com.hz.discount.control.HomeAllInNewActivity)



      这个其实是项目apk里面启动的问题:由于项目的apk启动默认的第一个activity,在调试的时候才停留在该activity,生产版本,则在启动后跳到第二个activity。(就是调试版本可以自己填写apk的跳转地址,但是现网的跳转地址是写死的那种)

解决方法:在启动参数里面加一个appWaitActivity,参数值填写第二个activity的值即可

'appActivity': '',
'appWaitActivity': ''}

你可能感兴趣的:(appium创建session失败:selenium.common.exceptions.WebDriverException: Message: A new session could not be)