0

I am facing "error forwarding the new session" for Android Emulator. My setup is appium node v1.53 configured with selenium grid v2.53.1 and genymotion android emulator. I need to invoke native browser of S6 device. But selenium grid is not forwarding my session to Appium. I have used below Node.json

{
    "capabilities": [{
            "applicationName": "S6",
            "browserName": "android",
            "deviceName": "192.168.57.101:5555",
            "version": "6.0",
            "maxInstances": 3,
            "platformName": "ANDROID"
    }],
    "configuration": {
            "cleanUpCycle": 2000,
            "timeout": 30000,
            "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
            "url": "http://127.0.0.1:4723/wd/hub",
            "host": "127.0.0.1",
            "port": 4723,
            "maxSession": 6,
            "register": true,
            "registerCycle": 5000,
            "hubPort": 4444,
            "hubHost": "127.0.0.1"
    }

}

And my desired capabilites are:

    //capabilities for Samsung Galaxy S6
    capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);
    capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"192.168.57.101:5555");
    capabilities.setCapability(MobileCapabilityType.VERSION, "6.0");
    capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "android");
    capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "6.0");
    capabilities.setCapability(MobileCapabilityType.UDID, "192.168.57.101:5555");


    WebDriver driver = new RemoteWebDriver(new URL(server), capabilities);

Can someone please help? I have tried all combinations of above capability type, not sure what i am doing wrong.

user16165
  • 297
  • 1
  • 4
  • 9

1 Answers1

0

Are You Sure About BROWSER_NAME="android" ? Open And Close your browser and share Logcat

Raj Abhishek
  • 75
  • 1
  • 9
  • Hi, below is the output of logcat. I tried using appPackage and appActivity too, but still getting the same error. `07-12 09:41:32.058 777 2605 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.android.browser cmp=com.android.browser/.BrowserActivity bnds=[1131,2235][1399,2571] (has extras)} from uid 10008 on display 0 07-12 09:41:32.071 777 1149 I ActivityManager: Start proc 4752:com.android.browser/u0a22 for activity com.android.browser/.BrowserActivity ` – user16165 Jul 12 '16 at 13:42
  • In Your Test Case Try This ((AndroidDriver)driver).startActivity("com.android.browser","com.android.browser.BrowserActivity") and leave BROWSER_NAME blank . – Raj Abhishek Jul 12 '16 at 14:03
  • @user16165 Any Update ? – Raj Abhishek Jul 18 '16 at 08:13