we are trying to run ios app using IPA file path on the simulator(ipad) , once we execute the below code the ios app will launches and closes in 2-3 seconds
Our Code is below:
IOSDriver driver;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“platformVersion”, “11.2”);
capabilities.setCapability(“platformName”, “iOS”);
capabilities.setCapability(“deviceName”, “iPad Pro (9.7-inch)”);
capabilities.setCapability(“automationName”, “XCUITest”);
File app = new File("/Users/svc-mac/Desktop/TestApp.ipa");
capabilities.setCapability(“app”, app.getAbsolutePath());
driver = new IOSDriver(new URL(“http://0.0.0.0:4723/wd/hub”), capabilities);
Environment:
Windows Edition: Windows 10 pro
Appium Desktop – v1.7.1
Eclipse: Version Oxygen.1a Release (4.7.1a)
Appium logs:
[Appium] Welcome to Appium v1.7.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/svc-mac/Desktop/TestApp.ipa",“automationName”:“XCUITest”,“deviceName”:“iPad Pro (9.7-inch)”,“platformName”:“iOS”,“platformVersion”:“11.2”},“capabilities”:{“desiredCapabilities”:{“app”:"/Users/svc-mac/Desktop/TestApp.ipa",“automationName”:“XCUITest”,“deviceName”:“iPad Pro (9.7-inch)”,“platformName”:“iOS”,“platformVersion”:“11.2”},“firstMatch”:[{“platformName”:“ios”}]}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/svc-mac/Desktop/TestApp.ipa",“automationName”:“XCUITest”,“deviceName”:“iPad Pro (9.7-inch)”,“platformName”:“iOS”,“platformVersion”:“11.2”},null,{“desiredCapabilities”:{“app”:"/Users/svc-mac/Desktop/TestApp.ipa",“automationName”:“XCUITest”,“deviceName”:“iPad Pro (9.7-inch)”,“platformName”:“iOS”,“platformVersion”:“11.2”},“firstMatch”:[{“platformName”:“ios”}]}]
[BaseDriver] Event ‘newSessionRequested’ logged at 1517596106701 (12:28:26 GMT-0600 (CST))
[Appium] Creating new XCUITestDriver (v2.51.1) session
[Appium] Capabilities:
[Appium] app: ‘/Users/svc-mac/Desktop/TestApp.ipa’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iPad Pro (9.7-inch)’
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘11.2’
[BaseDriver] Session created with session id: 0ea02afd-2b08-4cca-bf31-be9552bb793c
[XCUITest] Xcode version set to ‘9.2’ (tools v9.2.0.0.1.1510905681)
[XCUITest] iOS SDK Version set to ‘11.2’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1517596107526 (12:28:27 GMT-0600 (CST))
[iOSSim] Constructing iOS simulator for Xcode version 9.2 with udid ‘5E885670-07F0-4B46-BBAF-B7C48F7980DE’
[XCUITest] Determining device to run tests on: udid: ‘5E885670-07F0-4B46-BBAF-B7C48F7980DE’, real device: false
[BaseDriver] Using local app ‘/Users/svc-mac/Desktop/TestApp.ipa’
[BaseDriver] Copying local zip to tmp dir
[BaseDriver] Unzipping /var/folders/xh/br5ky4ms6n3115k2fmxwgb_1p1g0pb/T/201812-935-1o6vc4u.74o5kzw7b9/appium-app.zip
[BaseDriver] Testing zip archive: /var/folders/xh/br5ky4ms6n3115k2fmxwgb_1p1g0pb/T/201812-935-1o6vc4u.74o5kzw7b9/appium-app.zip
[BaseDriver] Unzipped local app to ‘/var/folders/xh/br5ky4ms6n3115k2fmxwgb_1p1g0pb/T/201812-935-1o6vc4u.74o5kzw7b9/Payload/TestAppQuoting.app’
[BaseDriver] Event ‘appConfigured’ logged at 1517596108536 (12:28:28 GMT-0600 (CST))
[XCUITest] Checking whether app ‘/var/folders/xh/br5ky4ms6n3115k2fmxwgb_1p1g0pb/T/201812-935-1o6vc4u.74o5kzw7b9/Payload/TestAppQuoting.app’ is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app ‘/var/folders/xh/br5ky4ms6n3115k2fmxwgb_1p1g0pb/T/201812-935-1o6vc4u.74o5kzw7b9/Payload/TestAppQuoting.app’: ‘com.TestApp’
[BaseDriver] Event ‘resetStarted’ logged at 1517596108542 (12:28:28 GMT-0600 (CST))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[BaseDriver] Event ‘resetComplete’ logged at 1517596108677 (12:28:28 GMT-0600 (CST))
[iOSLog] Starting iOS 11.2 simulator log capture
[iOSLog] System log path: /Users/svc-mac/Library/Logs/CoreSimulator/5E885670-07F0-4B46-BBAF-B7C48F7980DE/system.log
[BaseDriver] Event ‘logCaptureStarted’ logged at 1517596108768 (12:28:28 GMT-0600 (CST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[iOSSim] Setting common Simulator preferences to {“ConnectHardwareKeyboard”:false}
[iOSSim] Updated shared Simulator preferences at ‘/Users/svc-mac/Library/Preferences/com.apple.iphonesimulator.plist’ with {“ConnectHardwareKeyboard”:false}
[iOSSim] The count of running Simulator UI client instances is 2
[iOSSim] Both Simulator with UDID 5E885670-07F0-4B46-BBAF-B7C48F7980DE and the UI client are currently running
[BaseDriver] Event ‘simStarted’ logged at 1517596109162 (12:28:29 GMT-0600 (CST))
[XCUITest] Reset requested. Removing app with id ‘com.TestApp’ from the device
[XCUITest] Installing ‘/var/folders/xh/br5ky4ms6n3115k2fmxwgb_1p1g0pb/T/201812-935-1o6vc4u.74o5kzw7b9/Payload/TestAppQuoting.app’ on Simulator with UUID ‘5E885670-07F0-4B46-BBAF-B7C48F7980DE’…
[XCUITest] The app has been installed successfully.
[BaseDriver] Event ‘appInstalled’ logged at 1517596111733 (12:28:31 GMT-0600 (CST))
[XCUITest] Using WDA path: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Capability ‘useNewWDA’ set to false, so trying to reuse currently running WDA instance at ‘http://localhost:8100/’
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] WDA is not listening at ‘http://localhost:8100/’. Rebuilding…
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1517596111754 (12:28:31 GMT-0600 (CST))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Killing running processes ‘xcodebuild.*5E885670-07F0-4B46-BBAF-B7C48F7980DE, iproxy 8100, 5E885670-07F0-4B46-BBAF-B7C48F7980DE.*XCTRunner’ for the device 5E885670-07F0-4B46-BBAF-B7C48F7980DE…
[XCUITest] ‘pgrep -nif xcodebuild.*5E885670-07F0-4B46-BBAF-B7C48F7980DE’ didn’t detect any matching processes. Return code: 1
[XCUITest] ‘pgrep -nif iproxy 8100’ didn’t detect any matching processes. Return code: 1
[XCUITest] ‘pgrep -nif 5E885670-07F0-4B46-BBAF-B7C48F7980DE.*XCTRunner’ didn’t detect any matching processes. Return code: 1
[XCUITest] Using Xcode 9.2, so fixing WDA codebase
[XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=5E885670-07F0-4B46-BBAF-B7C48F7980DE IPHONEOS_DEPLOYMENT_TARGET=11.2’ in directory ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Output from xcodebuild will not be logged. To see xcode logging, use ‘showXcodeLog’ desired capability
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Log file for xcodebuild test: /var/folders/xh/br5ky4ms6n3115k2fmxwgb_1p1g0pb/T/com.apple.dt.XCTest/IDETestRunSession-F015C1AB-F5E7-418A-A687-19F39EEAE557/WebDriverAgentRunner-455BAF95-B262-460A-ADD8-8846BE57BB1A/Session-WebDriverAgentRunner-2018-02-02_122833-JeMXID.log
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: “{\n “value” : {\n “state” : “success”,\n “os” : {\n “name” : “iOS”,\n “version” : “11.2”\n },\n “ios” : {\n “simulatorVersion” : “11.2”,\n “ip” : “10.74.0.44”\n },\n “build” : {\n “time” : “Jan 5 2018 11:07:09”\n }\n },\n “sessionId” : “44ABBA72-FA3F-472D-B255-ABE70E60FDCF”,\n “status” : 0\n}”
[XCUITest] WebDriverAgent running on ip ‘10.74.0.44’
[XCUITest] WebDriverAgent successfully started after 3905ms
[BaseDriver] Event ‘wdaSessionAttempted’ logged at 1517596115742 (12:28:35 GMT-0600 (CST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.TestApp”,“arguments”:[],“environment”:{},“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}