简体   繁体   English

如何在相册中选择图片-iOS测试KIF

[英]How pick image on Albums - iOS testing KIF

Faced with this problem, when you select an image from the album comes not click on the image. 面对这个问题,当您从相册中选择一张图像时,请不要单击该图像。 At point pressure also occurs. 此时也会发生压力。 What to do? 该怎么办?

used:[tester choosePhotoInAlbum:@"Moments" atRow:0 column:0]; 使用:[测试者选择PhotoInAlbum:@“ Moments” atRow:0 column:0]; As well as: [tester tapScreenAtPoint:CGPointMake(47, 150)]; 以及:[测试器tapScreenAtPoint:CGPointMake(47,150)];

I was trying to figure this out as well. 我也试图弄清楚这一点。

Solved it by adding a [tester waitForTimeInterval:1] before [tester tapScreenAtPoint:CGPointMake(47, 150)] 通过在[tester tapScreenAtPoint:CGPointMake(47, 150)] [tester waitForTimeInterval:1]之前添加[tester waitForTimeInterval:1]解决了该问题

Like this: 像这样:

[tester tapViewWithAccessibilityLabel:@"Camera Roll"];  //Album Name
[tester waitForTimeInterval:1];
[tester tapScreenAtPoint:CGPointMake(47, 150)];
[tester tapViewWithAccessibilityLabel:@"Choose"];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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