Ios 如何使用UIDocumentBrowserViewController对应用程序进行UI测试

Ios 如何使用UIDocumentBrowserViewController对应用程序进行UI测试,ios,uitest,Ios,Uitest,我用UIDocumentBrowserViewController编写了一个应用程序。 从应用程序开始录制UI测试时,一旦我选择了文档,就会出现错误 时间戳事件匹配错误:找不到匹配元素 而是使用启动和记录视图层次结构 printd(XCUIApplication().debugDescription) 我得到以下结果: Attributes: Application, pid: 1564, label: 'TestApp' Element subtree: →Application, 0x28

我用UIDocumentBrowserViewController编写了一个应用程序。 从应用程序开始录制UI测试时,一旦我选择了文档,就会出现错误

时间戳事件匹配错误:找不到匹配元素

而是使用启动和记录视图层次结构

printd(XCUIApplication().debugDescription)
我得到以下结果:

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: ‚xxx 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 ‚xxx.TestApp'
  Output: {
    Application, pid: 1564, label: 'TestApp'
  }
文档(在此运行期间为3个)不可见。所以我无法访问它们

是否有任何必要的配置将这些包含在视图层次结构中(带有标签?)

XCode 10.1在iPhone和iPad(均为真实无模拟器)iOS 12.1.4上的测试