触摸特定坐标(UI测试)(Touch specific coordinate (UI tests))

编程入门 行业动态 更新时间:2024-10-17 15:23:29
触摸特定坐标(UI测试)(Touch specific coordinate (UI tests))

如何触摸UITests的特定坐标?

当我在特定的地方录制时,我有类似的东西:

XCUIApplication *app = [[XCUIApplication alloc] init]; [[[[[[[[[[app.otherElements containingType:XCUIElementTypeNavigationBar identifier:@"Navigation Bar title"] childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther] elementBoundByIndex:0] childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther] elementBoundByIndex:0].staticTexts[@"Action"] tap];

How can I touch specific coordinate with UITests?

When I'm recording tap on specific place, I have something like:

XCUIApplication *app = [[XCUIApplication alloc] init]; [[[[[[[[[[app.otherElements containingType:XCUIElementTypeNavigationBar identifier:@"Navigation Bar title"] childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther] elementBoundByIndex:0] childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther] elementBoundByIndex:0].staticTexts[@"Action"] tap];

更多推荐

本文发布于:2023-07-23 02:32:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1226478.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:坐标   测试   UI   Touch   coordinate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!