Я проверил другие ответы на этот вопрос, но не нашел решения, которое работает.
Я не уверен, но я думаю, что это связано с искажением возможностей, но я не нашел нигде, чтобы дать то, что должны быть правильные заглавные буквы.
Узел нормально регистрируется, запускает приложение на устройствах iOS, но затем просто останавливается, сообщая об ошибках, обнаруженных в журналах ниже.
Я получаю ответ 200 от сервера, но в журнале устройства я вижу ошибку, описанную выше, наряду с некоторыми дополнительными ошибками «недопустимых ключей» вокруг возможности «платформы».
Вот моя статистика:
Appium server: 1.9.2beta.2
Appium java-client: 6.1.0
Selenium grid and java client: 3.14.0 (I've tried the latest 3.141.59
but no luck)
iOS device is a real iPad, running iOS 12.1
Mac OSX: Mojave
Xcode: 10.1
Вот соответствующая часть журнала устройства (извинения за форматирование):
<code>org.openqa.selenium.WebDriverException: It is impossible to create a
new session because 'createSession' which takes HttpClient,
InputStream and long was not found or it is not accessible
build 16-Nov-2018 17:45:00 Build info: version: '3.14.0',
revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
build 16-Nov-2018 17:45:00 System info: host: '<hostRA>', ip:
'10.0.14.9', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-
862.3.2.el7.x86_64', java.version: '1.8.0_181'
build 16-Nov-2018 17:45:00 Driver info: driver.version: IOSDriver
build 16-Nov-2018 17:45:00 at
io.appium.java_client.remote.AppiumCommandExecutor$1.
createSession(AppiumCommandExecutor.java:195)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.remote.AppiumCommandExecutor.
createSession(AppiumCommandExecutor.java:209)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.remote.AppiumCommandExecutor.
execute(AppiumCommandExecutor.java:231)
build 16-Nov-2018 17:45:00 at
org.openqa.selenium.remote.RemoteWebDriver.execute
(RemoteWebDriver.java:548)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.DefaultGenericMobileDriver.execute
(DefaultGenericMobileDriver.java:42)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.AppiumDriver.execute
(AppiumDriver.java:1)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.ios.IOSDriver.execute
(IOSDriver.java:1)
build 16-Nov-2018 17:45:00 at
org.openqa.selenium.remote.RemoteWebDriver.startSession
(RemoteWebDriver.java:212)
build 16-Nov-2018 17:45:00 at
org.openqa.selenium.remote.RemoteWebDriver.<init> .
(RemoteWebDriver.java:130)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.DefaultGenericMobileDriver.<init> .
(DefaultGenericMobileDriver.java:38)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:84)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)
build 16-Nov-2018 17:45:00 at
io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:95)
build 16-Nov-2018 17:45:00 at
cucumber.driver.Factory.createPlatformDriver(Factory.java:54)
build 16-Nov-2018 17:45:00 at
cucumber.driver.Factory.createDriverWithLatestAppBuild
(Factory.java:36)
build 16-Nov-2018 17:45:00 at
cucumber.driver.Factory.createDriverWithApp(Factory.java:31)
build 16-Nov-2018 17:45:00 at
cucumber.support.Hooks.beforeScenario(Hooks.java:55)
build 16-Nov-2018 17:45:00 at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build 16-Nov-2018 17:45:00 at
sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:62)
build 16-Nov-2018 17:45:00 at
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
build 16-Nov-2018 17:45:00 at
java.lang.reflect.Method.invoke(Method.java:498)
build 16-Nov-2018 17:45:00 at
cucumber.runtime.Utils$1.call(Utils.java:40)
build 16-Nov-2018 17:45:00 at
cucumber.runtime.Timeout.timeout(Timeout.java:16)
build 16-Nov-2018 17:45:00 at
cucumber.runtime.Utils.invoke(Utils.java:34)
build 16-Nov-2018 17:45:00 at
cucumber.runtime.java.JavaHookDefinition.execute
(JavaHookDefinition.java:60)
build 16-Nov-2018 17:45:00 at
cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
build 16-Nov-2018 17:45:00 at
cucumber.runtime.Runtime.runHooks(Runtime.java:212)
...
build 16-Nov-2018 17:45:00 Caused by:
org.openqa.selenium.WebDriverException: Unable to parse remote
response: <html>
build 16-Nov-2018 17:45:00 <head>
build 16-Nov-2018 17:45:00 <meta http-equiv="Content-Type"
content="text/html;charset=utf-8"/>
build 16-Nov-2018 17:45:00 <title>Error 500 Server Error</title>
build 16-Nov-2018 17:45:00 </head>
build 16-Nov-2018 17:45:00 <body><h2>HTTP ERROR 500</h2>
build 16-Nov-2018 17:45:00 <p>Problem accessing /wd/hub/session.
Reason:
build 16-Nov-2018 17:45:00 <pre> Server Error
.
Причина:
java.io.IOException:
org.openqa.grid.common.exception.GridException: Cannot extract a
capabilities from the request: {
"desiredCapabilities": {
"app": "\u002f<APPNAME>.ipa",
"appium:udid": "<UDID>",
"newCommandTimeout": 10000,
"xcodeOrgId": "<XCODEID>",
"appium:deviceName": "iPad",
"platformName": "iOS",
"appium:automationName": "XCUITest",
"appium:platformVersion": "12.1",
"platform": "MAC",
"xcodeSigningId": "iPhone Developer",
"wdaLocalPort": 8108
},
"capabilities": {
"alwaysMatch": {
"appium:app": "\u002f<APPNAME>",
"appium:automationName": "XCUITest",
"appium:deviceName": "iPad",
"appium:platformVersion": "12.1",
"appium:udid": "<UDID>",
"appium:newCommandTimeout": 10000,
"platform": "MAC",
"platformName": "ios",
"appium:wdaLocalPort": 8108,
"appium:xcodeOrgId": "<ORGID>",
"appium:xcodeSigningId": "iPhone Developer"
},
"firstMatch": [
{
}
]
}
}
org.openqa.selenium.json.JsonException: Unable to determine type from:
<. Last 1 characters read: <
build 16-Nov-2018 17:45:01 Build info: version: '3.14.0',
revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
build 16-Nov-2018 17:45:01 System info: host: '93deac6ef15a', ip:
'10.0.14.9', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-
862.3.2.el7.x86_64', java.version: '1.8.0_181'
build 16-Nov-2018 17:45:01 Driver info: driver.version: IOSDriver
</code>