简体   繁体   中英

iOS UITesting Tap on uiview or PSTCollectionViewCell

I have used PSTCollectionView for collection view. As a result, when I record for UITesting and tap on that cell, it can't generate properly.

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. To tap on the "Shopping" cell try the following.

XCUIApplication *app = [[XCUIApplication alloc] init];
[app.staticTexts[@"Shopping"] tap];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM