Chrome opens for a second and the crashes

北慕城南 提交于 2019-12-08 08:16:33

问题


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'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":

回答1:


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

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



来源:https://stackoverflow.com/questions/40701588/chrome-opens-for-a-second-and-the-crashes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!