How to UI Test an App with a UIDocumentBrowserViewController

Hi,


I write an app with a UIDocumentBrowserViewController.

When recording a UI test from app start as soon as I select a document I get an error


Timestamped Event Matching Error: Failed to find matching element


Instead starting and logging the view hierarchie with


print(XCUIApplication().debugDescription)


I get the following result:


================ START =========================

Attributes: Application, pid: 1564, label: 'TestApp'

Element subtree:

→Application, 0x2808e4000, pid: 1564, label: 'TestApp'

Window (Main), 0x2808e40d0, {{0.0, 0.0}, {320.0, 568.0}}

Other, 0x2808e41a0, {{0.0, 0.0}, {320.0, 568.0}}

Window, 0x2808e4270, {{0.0, 0.0}, {320.0, 568.0}}

Other, 0x2808e00d0, {{0.0, 0.0}, {320.0, 568.0}}

Other, 0x2808e01a0, {{0.0, 0.0}, {320.0, 568.0}}

Other, 0x2808e0270, {{0.0, 0.0}, {320.0, 568.0}}

Window, 0x2808e0340, {{0.0, 0.0}, {320.0, 568.0}}

StatusBar, 0x2808e0410, {{0.0, 0.0}, {320.0, 20.0}}

Other, 0x2808e04e0, {{0.0, 0.0}, {320.0, 20.0}}

Other, 0x2808e05b0, {{0.0, 0.0}, {320.0, 20.0}}

Other, 0x2808e0680, {{6.0, 0.0}, {17.0, 20.0}}, label: '3 of 4 bars, signal strength'

Other, 0x2808e0750, {{26.0, 0.0}, {65.0, 20.0}}, label: ‚*** network'

Other, 0x2808e0820, {{96.0, 0.0}, {15.0, 20.0}}, label: '3 of 3 Wi-Fi bars', value: SSID

Other, 0x2808e08f0, {{146.0, 0.0}, {33.0, 20.0}}, label: '17:59'

Other, 0x2808e09c0, {{280.0, 0.0}, {35.0, 20.0}}, label: '98 % battery power, Charging'

Window, 0x2808e4340, {{0.0, 0.0}, {320.0, 568.0}}

Other, 0x2808e4410, {{0.0, 0.0}, {320.0, 568.0}}

Other, 0x2808e44e0, {{0.0, 0.0}, {0.0, 0.0}}

Window, 0x2808e45b0, {{-0.0, -0.0}, {320.0, 568.0}}

Other, 0x2808e4680, {{-0.0, -0.0}, {320.0, 568.0}}

Other, 0x2808e4750, {{0.0, 0.0}, {320.0, 568.0}}

Other, 0x2808e4820, {{-0.0, -0.0}, {320.0, 568.0}}

Path to element:

→Application, pid: 1564, label: 'TestApp'

Query chain:

→Find: Target Application ‚***.TestApp'

Output: {

Application, pid: 1564, label: 'TestApp'

}

================= END ========================


The documents ( 3 during this run) are not visible. So i can't access them.


Is there any configuration necessary to include these in the view hierarchie (with labels?)



XCode 10.1 Tests on iPhone and iPad (both real no simulator ) iOS 12.1.4