0

我正面临 Android 模拟器的“错误转发新会话”。我的设置是配置了 selenium grid v2.53.1 和 genymotion android 模拟器的 appium node v1.53。我需要调用 S6 设备的本机浏览器。但是 selenium 网格没有将我的会话转发到 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);

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

4

1 回答 1

0

你确定 BROWSER_NAME="android" 吗?打开并关闭您的浏览器并共享 Logcat

于 2016-07-12T09:05:34.057 回答