Hi!
I have one hub running where two nodes are connected. One for the iOS Simulator and one for the real iOS device (iPhone) - see configuration below. The problem is whenever I run a real device test it is executed on the simulator node, or vice versa.
Did I mess up something with the device capabilities? In my opinion, when I setup the capabilities correct, it should run on the hub with the matching capabilities - see below.
I tried to run only the real device node and started my simulator tests: I expected that there’s no matching device but the tests where executed on the node.
Any suggestions? Thank you in advance!
Simulator capabilities:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.IOS); capabilities.setCapability(MobileCapabilityType.APP, "/Users/stefan/test.app.zip");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 5");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.0");
Real device capabilities:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.IOS); capabilities.setCapability(MobileCapabilityType.APP, "/Users/stefan/test.ipa");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Stefan's iPhone 5");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.0");
capabilities.setCapability(MobileCapabilityType.UDID, "<some udid>");
Hub:
selenium-server -host 127.0.0.1 -p 4444 -role hub
Simulator node config:
{
"capabilities":
[
{
"platformName": "iOS",
"app": "/Users/stefan/test.app.zip"
}
],
"configuration":
{
"timeout":30000,
"url":"http://127.0.0.1:4735/wd/hub",
"host": "127.0.0.1",
"port": 4735,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": "127.0.0.1"
}
}
Real device node config:
{
"capabilities":
[
{
"platformName": "iOS",
"platformVersion": "9.0",
"deviceName": "Stefan's iPhone 5",
"udid": "<some udid>",
"app": "/Users/stefan/test.ipa"
}
],
"configuration":
{
"timeout":30000,
"url":"http://127.0.0.1:4732/wd/hub",
"host": "127.0.0.1",
"port": 4732,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": "127.0.0.1"
}
}