转发新会话时出错无法找到:Android模拟器的功能

时间:2016-07-11 15:23:15

标签: android selenium appium remotewebdriver httpbrowsercapabilities

我正面临"错误转发新会话"对于Android Emulator。我的设置是appium node v1.53配置了selenium grid v2.53.1和genymotion android模拟器。我需要调用S6设备的本机浏览器。但是selenium grid并没有将我的会话转发给Appium。我在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"
    }

}

我想要的能力是:

    //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);

有人可以帮忙吗?我已经尝试了以上功能类型的所有组合,不确定我做错了什么。

1 个答案:

答案 0 :(得分:0)

您确定关于BROWSER_NAME =“android”吗? 打开并关闭浏览器并共享Logcat