[英]iOS UITesting Tap on uiview or PSTCollectionViewCell
I have used PSTCollectionView for collection view. 我已将PSTCollectionView用于集合视图。 As a result, when I record for UITesting and tap on that cell, it can't generate properly.
结果,当我录制UITesting并点击该单元格时,它无法正确生成。
XCUIApplication *app = [[XCUIApplication alloc] init];
[app tap];
How shall I do to simulate for that case? 在这种情况下,我应该如何模拟? My view hierarchy is as shown below.
我的视图层次结构如下所示。
You should be able to interact with a UILabel
s directly. 您应该可以直接与
UILabel
进行交互。 To tap on the "Shopping" cell try the following. 要点击“购物”单元格,请尝试以下操作。
XCUIApplication *app = [[XCUIApplication alloc] init];
[app.staticTexts[@"Shopping"] tap];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.