Tag: xcode ui testing

xcode:时间戳事件匹配错误:无法find匹配的元素

我试图logging一些XCUITesting函数。 我得到这个错误。 Timestamped Event Matching Error: Failed to find matching element 这是一个Xcode错误和/或与我的用户界面的复杂性问题?

时间戳事件匹配错误:无法find匹配的元素

我试图在Xcode中生成一个UItest。 当我尝试滑动UIview时出现错误: Timestamped Event Matching Error: Failed to find matching element 错误窗口 如果我尝试点击UIView,也会发生这种情况。

有没有办法在Xcode 7中的Swift XCTest UI中的testing之间重置应用程序?

在XCTest中是否有API调用,我可以放入setUP()或tearDown()来重置testing之间的应用程序? 我查看了XCUIApplication的点语法,我只看到了.launch() OR有没有办法在Swift中调用shell脚本? 然后我可以调用xcrun中间的testing方法来重置模拟器。

UItesting失败 – 获取元素错误-25201的快照失败

我目前在运行iOS的UItesting时遇到了这个问题 Assertion Failure: UI Testing Failure – Failure getting snapshot Error Domain=XCTestManagerErrorDomain Code=9 "Error -25201 getting snapshot for element <AXUIElement 0x7faf7b4173f0> {pid=84523}" UserInfo={NSLocalizedDescription=Error -25201 getting snapshot for element <AXUIElement 0x7faf7b4173f0> {pid=84523}} 目前使用Xcode v7.3.1,Cocoapods v1.0.1 我尝试删除DerivedData,Pods /,Podfile.lock和* .xcworkspace,然后运行pod安装。 没有运气。 仍然遇到错误。 首先在Xcode 7.3中有经验。 升级它和问题仍然存在。 谁经历过同样的事情,解决了这个问题? 请分享您的解决scheme。 谢谢。

Xcode UItesting – UItesting失败 – 点击search字段“取消”button时,无法滚动到可见(通过AX操作)

我试图通过点击search栏中的“取消”button来closuressearch栏。 testing用例未能find取消button。 它在Xcode 7.0.1中工作正常 我添加了谓词来等待button出现。 点击“取消”button,testing用例失败 let button = app.buttons[“Cancel”] let existsPredicate = NSPredicate(format: "exists == 1") expectationForPredicate(existsPredicate, evaluatedWithObject: button, handler: nil) waitForExpectationsWithTimeout(5, handler: nil) button.tap() // Failing here 日志 : t = 7.21s Tap SearchField t = 7.21s Wait for app to idle t = 7.29s Find the SearchField t = 7.29s Snapshot accessibility […]

UItesting失败 – 无论是元素还是任何后代都没有关注secureTextField的键盘

这是我的情况: let passwordSecureTextField = app.secureTextFields["password"] passwordSecureTextField.tap() passwordSecureTextField.typeText("wrong_password") //here is an error 用户界面testing失败 – 任何元素或任何后代都没有键盘焦点。 元件: 哪里不对? 这对正常的textFields secureTextFields用,但问题只出现在secureTextFields 。 任何解决方法?

在Xcode UItesting的testing案例中延迟/等待

我正在尝试使用Xcode 7 beta 2中提供的新UItesting编写一个testing用例。该应用程序有一个login屏幕,用于呼叫服务器进行login。 这是一个延迟,因为这是一个asynchronous操作。 在继续执行下一步之前,是否有办法在XCTestCase中引起延迟或等待机制? 没有适当的文档可用,我经历了类的头文件。 无法find与此相关的任何内容。 任何想法/build议?

Xcode 7用户界面testing:如何解除代码中的一系列系统警报

我正在编写使用新的Xcode 7 UItestingfunction的UItesting用例。 在我的应用程序的某个时候,我要求用户许可摄像头访问和推送通知。 因此,两个iOSpopup窗口将显示: "MyApp Would Like to Access the Camera"popup窗口和"MyApp Would Like to Send You Notifications"popup。 我想我的testing,以消除这两个popup窗口。 UIlogging为我生成了以下代码: [app.alerts[@"cameraAccessTitle"].collectionViews.buttons[@"OK"] tap]; 但是, [app.alerts[@"cameraAccessTitle"] exists]parsing为false,上面的代码生成一个错误: Assertion Failure: UI Testing Failure – Failure getting refresh snapshot Error Domain=XCTestManagerErrorDomain Code=13 "Error copying attributes -25202" 。 那么在testing中解除一堆系统警报的最好方法是什么? 系统popup窗口中断我的应用程序stream程,并立即失败我的正常UItesting用例。 事实上,有关如何绕过系统警报的任何build议,所以我可以恢复testing通常的stream程,赞赏。 这个问题可能与这个SOpost有关,也没有答案: Xcode7 | Xcode UItesting| 如何处理位置服务警报? 提前致谢。