首页 > 解决方案 > XCTest 失败并出现错误“类 AXAccessQueue 在两者中都实现...”

问题描述

XCTest 失败并出现以下错误。测试运行良好,直到它导航到页面,然后在尝试查找该页面上的任何元素时在日志中显示以下错误。

当尝试手动访问该页面时,它可以正常工作,没有任何问题。画外音也可以正常工作。错误仅在运行测试时发生。

objc[51026]:AXAccessQueue 类在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/ 中都实现了Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities (0x12f627780) 和 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/系统/库/PrivateFrameworks/Accessibility.framework/Frameworks/AXHearingSupport.framework/AXHearingSupport (0x139359888)。将使用两者之一。哪一个是未定义的。

objc[51026]:AXAccessQueueTimer 类在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/ 中都实现了Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities (0x12f624d50) 和 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/系统/库/PrivateFrameworks/Accessibility.framework/Frameworks/AXHearingSupport.framework/AXHearingSupport (0x1393598d8)。将使用两者之一。哪一个是未定义的。

尝试使用 Xcode 10 和 10.1,模拟器 iphone 8、8 plus、XR。

标签: iosxctestxcode10xcuitest

解决方案


推荐阅读