Chrome打开一秒钟,然后崩溃 [英] Chrome opens for a second and the crashes

查看:108
本文介绍了Chrome打开一秒钟,然后崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Appium和C#以便在我的Galaxy S5上运行测试. 一切正常,但昨晚我们将ChromeDriver更新为2.25,突然我的手机中的Chrome打开了Chrome,在URL中显示"data:"并崩溃了.另一方面,Windows OS(硒)上的Chrome浏览器效果很好.

I'm using Appium and C# in order to run tests on my Galaxy S5. Everyhting worked perfectly , but last night we have updated the ChromeDriver to 2.25 and suddenly the chrome in my mobile just open the chrome, shows "data:" in the URL and crashes. on the other hand, the chrome in on Windows OS(selenium) works well.

  [SetUp]
        public void Setup() 
       {
           DesiredCapabilities capabilities = new DesiredCapabilities();
           capabilities.SetCapability("device", "Android");
           capabilities.SetCapability("deviceName", "Galaxy S5");
           capabilities.SetCapability("newCommandTimeout", "300");
           capabilities.SetCapability("platformName", "Android");
           capabilities.SetCapability("platformVersion", "6.0.1");
           capabilities.SetCapability("appPackage", "com.android.chrome");
           capabilities.SetCapability("appActivity", "org.chromium.chrome.browser.ChromeTabbedActivity");
         _driver = new AndroidDriver<AppiumWebElement>(new Uri("http://127.0.0.1:4723/wd/hub"), capabilities, TimeSpan.FromSeconds(180));

        
        }

Appium的错误:

Appium's ERROR:

 info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: A new session could not be created. (Original error: session not created exception\nfrom unknown error: Runtime.executionContextCreated has invalid 'context': {\"auxData\":{\"frameId\":\"31754.1\",\"isDefault\":true},\"id\":1,\"name\":\"\",\"origin\":\"://\"}\n  (Session info: chrome=54.0.2840.85)\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64)))","status":33,"value":

推荐答案

手动将Appium的chromedriver更新为最新版本,从而为我解决了该问题.

updating the Appium's chromedriver manually to the latest one fixed the problem for me.

只需下载最新的chromedriver vsersion,然后将其放在以下路径中即可:

just downlaod the latest chromedriver vsersion and put it in the following path:

C:\ Program Files(x86)\ Appium \ node_modules \ appium \ node_modules \ appium-chromedriver \ chromedriver \ win

C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win

这篇关于Chrome打开一秒钟,然后崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆