MobileNativeFoundation / bluepill

Bluepill is a reliable iOS testing tool that runs UI tests using multiple simulators on a single machine
BSD 2-Clause "Simplified" License
3.19k stars 232 forks source link

Add NSXMLDocumentTidyXML as option to NSXMLDocument #464

Closed AhmedEid closed 3 years ago

AhmedEid commented 3 years ago

We noticed that when we run our XCUITests with bluepill, we need to pass in NSXMLDocumentTidyXML as an option when generating the XML results, since Apple's XCUITest output includes some illegal characters, such as """; below:

t =    47.17s Find: Elements matching predicate '"create_channel_privacy_switch" IN identifiers'

Apple's XCUITest framework prints these characters, and as far as I know, there isn't a way to control the verbosity level of XCUITest output logs.

Per Apple's documentation here: https://developer.apple.com/documentation/foundation/nsxmldocument/1413086-initwithdata

"If you specify NSXMLDocumentTidyXML as one of the options, NSXMLDocument performs several clean-up operations on the document XML (such as removing leading tabs). It does respect the xml:space="preserve" attribute when it attempts to tidy the XML."