1

I'm getting the error below when I try to open default chrome web browser on my mobile phone using Appium and c#.

It opens chrome for few seconds and it get dispersed, So I can't perform my test steps.

> 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\":\"7128.1\",\"isDefault\":true},\"id\":1,\"name\":\"\",\"origin\":\"://\"}\n  (Session info: chrome=56.0.2924.87)\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.3 x86_64)))","status":33,"value":{"message":"session not created exception\nfrom unknown error: Runtime.executionContextCreated has invalid 'context': {\"auxData\":{\"frameId\":\"7128.1\",\"isDefault\":true},\"id\":1,\"name\":\"\",\"origin\":\"://\"}\n  (Session info: chrome=56.0.2924.87)\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.3 x86_64)"},"httpCode":200,"origValue":"A new session could not be created. (Original error: session not created exception\nfrom unknown error: Runtime.executionContextCreated has invalid 'context': {\"auxData\":{\"frameId\":\"7128.1\",\"isDefault\":true},\"id\":1,\"name\":\"\",\"origin\":\"://\"}\n  (Session info: chrome=56.0.2924.87)\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.3 x86_64))"},"sessionId":null}
> info: <-- POST /wd/hub/session 500 35983.830 ms - 1363 
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
> info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"}

This is what my code looks like.

public static AppiumDriver<IWebElement> driver { get; set; }
[TestMethod]
public void TestMethod1()
{
    DesiredCapabilities capabilities = new DesiredCapabilities();
   // capabilities.SetCapability("device", "Android");
    capabilities.SetCapability("app", "Chrome");
     capabilities.SetCapability(CapabilityType.BrowserName, "");
    capabilities.SetCapability(CapabilityType.Version, "6.0.1");
    capabilities.SetCapability(CapabilityType.BrowserName, "Chrome");
    capabilities.SetCapability(CapabilityType.Platform, "ANDROID");
    capabilities.SetCapability(CapabilityType.Version, "5.0.2");
    capabilities.SetCapability("deviceName", "FAAZCY04X185");
    capabilities.SetCapability("platformName", "ANDROID");




    //cap.setCapability("autoAcceptAlerts", true);
   // cap.setCapability("disable-popup-blocking", false);

    //webDriver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), cap);


     driver = new AndroidDriver<IWebElement>(new Uri("http://127.0.0.1:4723/wd/hub"), capabilities, TimeSpan.FromSeconds(180));
   // IWebDriver driver = new RemoteWebDriver(new  Uri("http://127.0.0.1:4723/wd/hub"), capabilities);
    driver.Navigate().GoToUrl("http://www.yahoo.com");

}
0

I just updated the default chrome driver which came with Appium. Default chrome driver was at:

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

As on the image, old Chrome driver which came with Appium is having only 4908 KB.

But the new one is having lot: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.