Как запустить Appium на iOS Simulator 8.x/7.x

Я пытаюсь сделать автоматизацию с помощью Appium на симуляторах ios. Моя конфигурация:

OS version: 10.10.x
Appium: 1.4.0
Xcode: 6.3.2

и колпачки для аппия это:

automationName = "Appium"
platformName = "iOS"
platformVersion = "8.3"
deviceName = "iPhone 5s"
app = "/Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app"

Когда я запускаю appium, он дает мне ошибку:

info: [debug] Attempting to run app on iPhone 5s (8.3 Simulator)
info: [debug] Spawning instruments with command: /Applications/xcode6.3/Xcode6.3.2.app/Contents/Developer/usr/bin/instruments -t /Applications/xcode6.3/Xcode6.3.2.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w "iPhone 5s (8.3 Simulator)" /Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app -e UIASCRIPT "/Users/skaram200/Library/Application Support/appium/bootstrap/bootstrap-4d92d75355d74eeb.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-09-10 10:47:20.672 instruments[36855:1272282] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Unable to install app with path: /Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app: "(null)"
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Killall iOS Simulator
info: [debug] Cleaning sim data files
info: Executing: xcrun simctl erase F54870E7-17FD-4A07-B6EE-1636F6AB5757 with timeout 2000
info: Executing: xcrun simctl erase F54870E7-17FD-4A07-B6EE-1636F6AB5757 with timeout 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/skaram200/Library/Developer/CoreSimulator/Devices/F54870E7-17FD-4A07-B6EE-1636F6AB5757/data/Applications doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
    at [object Object].Instruments.onInstrumentsExit (/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/lib/instruments.js:440:31)
    at [object Object].<anonymous> (/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/lib/instruments.js:353:12)
    at ChildProcess.emit (events.js:110:17)
    at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
```

Пожалуйста, дайте мне знать, как я могу устранить эти ошибки и начать автоматизировать симуляторы ios с помощью appium.


person born2Learn    schedule 10.09.2015    source источник


Ответы (3)


Здесь вам нужно передать --default-device или -dd как true для симуляторов и указать --bundleID приложения. И нам нужен файл отладки .ipa или .app для автоматизации.

person Rohith    schedule 11.09.2015
comment
Я постараюсь и дам вам знать. - person born2Learn; 11.09.2015
comment
Я предоставил bundleId и --dd как истину, но все равно сохраняется та же ошибка. ``` [INST STDERR] Ошибка трассировки инструментов: не удалось запустить цель: невозможно установить приложение с путем: /Users/skaram200/Desktop/ios_build/XfinityMyAccount_6_3.app: (null) информация: [debug] [INSTSERVER] Инструменты вышли с код 253 ``` - person born2Learn; 12.09.2015
comment
Утверждается, что путь к приложению не подходит для установки, и в качестве входных данных он получает значение null. Пожалуйста, проверьте и укажите правильный путь к приложению. - person Rohith; 12.09.2015
comment
Я переместил сборку в другую папку и попытался, но все равно та же проблема. Кроме того, я указал тот же путь, по которому создается и хранится сборка. Но все та же проблема. - person born2Learn; 12.09.2015
comment
Могут возникнуть проблемы с симуляторами. Попробуйте запустить код один раз на реальном устройстве и поделитесь логами. - person Rohith; 14.09.2015
comment
У меня возникла проблема, она была со сборкой BUILD. - person born2Learn; 14.09.2015

Создание успешной сборки без ошибки.

person born2Learn    schedule 14.09.2015
comment
Это не должно быть ответом. Это должен быть комментарий. - person mandelbaum; 18.05.2017

Я использую Cordova, у меня тоже есть некоторые проблемы, это то, что я сделал для создания .app:

cordova build ios --emulator

Вот и все, после этого я смог использовать Appium и отправить .app в симулятор.

Я надеюсь, что это поможет кому-то еще!

person Wils    schedule 16.05.2017