Hi @rgonalo ,
I am facing the same issue but in my case i am using Selenium Grid Extras. I tried different ways but nothing helped.getting the same Error forwarding the new session cannot find : Capabilities
Can you please help?
I am trying to run a simple test against the real iOS device using Appium 1.7.1 together with Selenium GRID Extras. I am using Java language.
When i run the test my expectation is the hub should identify the node and run the test. correct me if i am wrong.
In the below test i have used IOSDriver but if i am passing the hubip then should i have to use RemoteWebDriver? i am not sure about it.
My test:
public void test() throws InterruptedException {
IOSDriver driver;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME , "iOS");
capabilities.setCapability (MobileCapabilityType.PLATFORM_VERSION, "11.2.1");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, BrowserType.SAFARI);
capabilities.setCapability(MobileCapabilityType.UDID,"xxxxxxx");
capabilities.setCapability("xcodeOrgId","xxxxxxx");
capabilities.setCapability("xcodeSigningId","id");
capabilities.setCapability("applicationName","automation");
URL url = new URL("http://hubip:4445/wd/hub");
driver = new IOSDriver(url,capabilities);
driver.navigate().to("https://www.google.com");
System.out.println("Title"+ driver.getTitle());
}
appium node config:
{
“capabilities”: [
{
“seleniumProtocol”: “WebDriver”,
“browserName”: “safari”,
“maxInstances”: 1,
“version”: “11”,
“platform”: “MAC”,
“applicationName”: “automation”
}
],
“loadedFromFile”: “appium_node_4723.json”,
“proxy”: “com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy”,
“servlets”: [],
“maxSession”: 1,
“port”: 4723,
“register”: true,
“unregisterIfStillDownAfter”: 10000,
“hubPort”: 4445,
“hubHost”: “hubip”,
“host”: “hubip”,
“url”: “http://hubip:4723/wd/hub”,
“registerCycle”: 5000,
“nodeStatusCheckTimeout”: 10000,
“appiumStartCommand”: “appium”,
“custom”: {
“grid_extras_port”: 3000
},
“downPollingLimit”: 0
}
Hub Config:
{
“port”: 4445,
“newSessionWaitTimeout”: 25000,
“servlets”: [
“com.groupon.seleniumgridextras.grid.servlets.ProxyStatusJsonServlet”
],
“capabilityMatcher”: “org.openqa.grid.internal.utils.DefaultCapabilityMatcher”,
“throwOnCapabilityNotPresent”: true,
“nodePolling”: 5000,
“cleanUpCycle”: 5000,
“browserTimeout”: 120000,
“timeout”: 120000,
“maxSession”: 5
}
when i try to run the test i get the following error
org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities {applicationName: automation, browserName: safari, deviceName: iPhone, platformName: ios, platformVersion: 11.2.1, udid:xxx., xcodeOrgId: XXX, xcodeSigningId: id}
In the test if i specify the url with the appium port
URL url = new URL(“http://hubip:4723/wd/hub”);
then the test works fine
but if i specify the Hub port it throws the above error
URL url = new URL(“http://hubip:4445/wd/hub”);