Search code examples
iosxcodexcode10ios-ui-automationxcuitest

Xcode 10 - Unable to view element tree in console using po


I recently upgraded to Xcode 10 and when trying to debug my UI tests, I typically use po XCUIApplication(). This will not print out the tree for me now? I can only get it to display in the console if I edit the code to include print(XCUIApplication().debugDescription) before my debug point. I also tried putting po XCUIApplication().debugDescription within the console window but that only prints the same two lines shown here: enter image description here

Any suggestions for how to get it to appear again in the console without using the debug line in the code?


Solution

  • Determined this was due to 'All Output' being selected instead of 'Debugger Output' in the bottom left of the console window.

    enter image description here