I am attempting to start a Facebook/Appium WebDriverAgent Xcode UI Test using Quamotion’s xcuitrunner on a computer running Windows. I have downloaded version 0.114.18 of xcuitrunner from http://docs.quamotion.mobi/quamotion4appium/xcuitrunner/. Nonetheless, upon executing the xcuitrunner command, the following information is displayed:
Quamotion Xcode UI Test Runner version 0.114.18+34d082af40
Machine ID: XXXXXXXX
Specify --help for a list of available options and commands.
Is everything going according to plan? What is the next step?
I am interested in establishing a connection with the WebDriverAgent and retrieving information about the user interface
2 Answers
To initiate xcuitrunner, use the subsequent syntax:
xcuitrunner.exe run -d [path to your developer profile] -p [password for your developer profile] -k [path to the directory containing the developer disk images]
You have to substitute the values in the square brackets with the specific values for your computer. Once the xcuitrunner begins, you should observe results similar to the following:
Quamotion Xcode UI Test Runner version 0.114.18+34d082af40
Machine ID: XXXXXXXX
Using a license for which expires on 1/1/2020 1:00:00 AM
The Xcode UI Test will be resigned:
- Developer Certificate: [Your Certificate]
- Provisioning Profile: [Your Provisioning Profile]
Starting the Xcode UI Test
2019-05-07 11:42:51.046729+0200 WebDriverAgentRunner-Runner[513:143347] Running tests...
objc[513]: Class GCDAsyncSocketPreBuffer is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c578) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x105509358). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncReadPacket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c5c8) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x1055093a8). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncWritePacket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c618) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x1055093f8). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncSpecialPacket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c668) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x105509448). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncSocket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c6b8) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x105509498). One of the two will be used. Which one is undefined.
Test Suite 'All tests' started at 2019-05-07 11:42:53.213
XCTestOutputBarrier
Test Suite 'WebDriverAgentRunner.xctest' started at 2019-05-07 11:42:53.233
XCTestOutputBarrier
Test Suite 'UITestingUITests' started at 2019-05-07 11:42:53.249
XCTestOutputBarrier
Test Case '-[UITestingUITests testRunner]' started.
XCTestOutputBarrier
t = 0.01s Start Test at 2019-05-07 11:42:53.275
t = 0.04s Set Up
2019-05-07 11:42:53.368596+0200 WebDriverAgentRunner-Runner[513:143347] Built at Mar 8 2019 13:46:49
2019-05-07 11:42:53.578806+0200 WebDriverAgentRunner-Runner[513:143347] ServerURLHere->http://10.9.8.50:8100<-ServerURLHere
2019-05-07 11:42:53.585966+0200 WebDriverAgentRunner-Runner[513:143397] Using singleton test manager
- done. Took 17s
The WebDriverAgent session is ready at http://localhost:50140/session/A5EF3EEC-3B2F-4959-82B1-390077C1356C
Hit CRTL-C to stop the Xcode UI Test
The URL listed in the results is the location at which the server is currently operating. This URL will change every time you start the xcuitrunner. The server functions as a Selenium/WebDriver/Appium server, and you may establish a direct HTTP connection with it. For instance, you could visit http://localhost:50140/session/A5EF3EEC-3B2F-4959-82B1-390077C1356C/source (ensuring you substitute the first part with the actual values on your device) to obtain the Document Object Model (DOM) of the currently visible screen on the device.
There are also illustrations of how you can communicate with this server through the command line available at https://github.com/facebook/WebDriverAgent/wiki/Queries. Furthermore, you may use an Appium or WebDriver client library in the programming language of your choice to request a connection to the Appium server at this URL. The process of achieving this is dependent on the programming language you are employing.