I’m trying to setup WebDriverAgent before starting any kind of development in Appium.
This is my setup:
El Capitan 10.11.6
XCODE 8.2.1
Appium 1.6.3 installed through sudo nam install -g appium
and then I did all this.
brew install libimobiledevice --HEAD
brew install carthage
npm install -g ios-deploy
gem install xcpretty
npm install appium-doctor -g
npm install appium-xcuitest-driver
Then I did this.
cd /usr/local/lib/node_modules/appium-xcuitest-driver/WebDriverAgent
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh -d
Then I signed WebDriverAgentLib and WebDriverAgentRunner. No errors. Except this build time issues.
“The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)”
Now I ran the following command on 2 real devices. 1 on iPhone 6 Plus and an iPad.
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=cd82456f42112bf4b417613ed3734k5j45k947a8b4a’ test
iPad is stuck at this
ODEV1s-MacBook-Pro:WebDriverAgent odev1$ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=909894401609eca3794kj2452l5k24f2ce2c8d1’ test
2017-01-17 13:15:09.148 xcodebuild[5112:27023] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/odev1/Library/Developer/Xcode/DerivedData/WebDriverAgent-gvltwgknevnwclanwpylmjozekma/Logs/Test/56DEBBD1-2134-4805-9A83-2932C891BB27/Session-WebDriverAgentRunner-2017-01-17_131509-Qfhlb7.log
2017-01-17 13:15:09.148 xcodebuild[5112:26980] [MT] IDETestOperationsObserverDebug: (997531EE-A4FD-45E9-9001-73E355B5F59B) Beginning test session WebDriverAgentRunner-997531EE-A4FD-45E9-9001-73E355B5F59B at 2017-01-17 13:15:09.147 with Xcode 8C1002 on target <DVTiOSDevice: 0x7fb64cb32660> {
deviceSerialNumber: DMQN1EVCFK10
identifier: 909894401609eca37940845m4l5k24f2ce2c8d1
deviceClass: iPad
deviceName: iPad
deviceIdentifier: 909894401609eca379404545224f2ce2c8d1
productVersion: 10.1.1
buildVersion: 14B100
deviceSoftwareVersion: 10.1.1 (14B100)
deviceArchitecture: arm64
deviceTotalCapacity: 12265533440
deviceAvailableCapacity: 9163575296
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
deviceType: <DVTDeviceType:0x7fb649e03220 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1,
2
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
} (10.1.1 (14B100))
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/b660174c1c1c834b3f6a5d1e14807f03/909894401609eca379408aeac8db224f2ce2c8d1/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/usjaxfsodev1/Library/Developer/Xcode/DerivedData/WebDriverAgent-gvltwgknevnwclanwpylmjozekma/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QJIMrA/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
dst_ipa: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QJIMrA/WebDriverAgentRunner-Runner.app_sparse.ipa
__MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QJIMrA/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QJIMrA/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
Test Suite ‘All tests’ started at 2017-01-17 13:15:16.877
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-01-17 13:15:16.881
Test Suite ‘UITestingUITests’ started at 2017-01-17 13:15:16.882
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-01-17 13:15:16.888
t = 0.01s Set Up
It is just stuck here. Nothing happened. I waited for 2 hours.
**
iPhone 6 Plus:
**
ODEV1s-MacBook-Pro:WebDriverAgent usjaxfsodev1$ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=cd82456f42112bf4b417613245lk42j5bc7947a8b4a’ test
2017-01-17 14:16:05.809 xcodebuild[5218:39260] [MT] IDETestOperationsObserverDebug: (6341ED4E-557A-49E7-9989-D79EDD0D6745) Beginning test session WebDriverAgentRunner-6341ED4E-557A-49E7-9989-D79EDD0D6745 at 2017-01-17 14:16:05.808 with Xcode 8C1002 on target <DVTiOSDevice: 0x7fa66d900b50> {
deviceSerialNumber: F2LNKFPZG5QF
identifier: cd82456f42112bf4b41761345n34lk7947a8b4a
deviceClass: iPhone
deviceName: Phone with Touchscreen
deviceIdentifier: cd82456f42112bf4b417613ed3702bc7947a8b4a
productVersion: 10.0.2
buildVersion: 14A456
deviceSoftwareVersion: 10.0.2 (14A456)
deviceArchitecture: arm64
deviceTotalCapacity: 11945771008
deviceAvailableCapacity: 60297216
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
deviceType: <DVTDeviceType:0x7fa66d5b09a0 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
} (10.0.2 (14A456))
2017-01-17 14:16:05.809 xcodebuild[5218:39275] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/usjaxfsodev1/Library/Developer/Xcode/DerivedData/WebDriverAgent-gvltwgknevnwclanwpylmjozekma/Logs/Test/AB4B9CE4-015E-4CCB-AFB5-CA3DAB227A55/Session-WebDriverAgentRunner-2017-01-17_141605-eqVW4z.log
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/b660174c1c1c834b3f6a5d1e14807f03/cd82456f42112bf4b417613ed3702bc7947a8b4a/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/usjaxfsodev1/Library/Developer/Xcode/DerivedData/WebDriverAgent-gvltwgknevnwclanwpylmjozekma/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.7D55gL/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
dst_ipa: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.7D55gL/WebDriverAgentRunner-Runner.app_sparse.ipa
__MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.7D55gL/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/py/plwdfs0s247d2sbkzx65kr640000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.7D55gL/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
2017-01-17 14:16:46.075141 XCTRunner[4840:223941] Running tests…
2017-01-17 14:16:47.100810 XCTRunner[4840:223941] Continuing to run tests in the background with task ID 1
Test Suite ‘All tests’ started at 2017-01-17 14:16:47.745
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-01-17 14:16:47.748
Test Suite ‘UITestingUITests’ started at 2017-01-17 14:16:47.749
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-01-17 14:16:47.754
t = 0.01s Set Up
2017-01-17 14:16:47.763680 XCTRunner[4840:224024] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1740e7200> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application’s container requires user-preference-write or file-write-data sandbox access, switching to read-only
2017-01-17 14:16:47.769460 XCTRunner[4840:223941] Built at Jan 17 2017 11:48:31
2017-01-17 14:16:47.804932 XCTRunner[4840:223941] ServerURLHere->http://10.243.209.155:8100<-ServerURLHere
2017-01-17 14:16:47.806683 XCTRunner[4840:223941] Listening on USB
error in __connection_block_invoke_2: Connection interrupted
Now I know the outcome of this command should be “Listening on USB” but I get an error in connection line after that. Also the app is installed on the device but I see only a black screen. It launches and closes immediately while all this happens.
Any help to point me in any direction would be appreciated.
Thanks in Advance.