ios - 是否有用于获取子元素(即 window.buttons() )的 iOS 自动化引用主列表?

标签 ios cocoa-touch automated-tests ios-ui-automation

当我在执行自动化测试时尝试引用我的应用程序中的搜索栏时,我遇到了困难。 如果我使用类似的东西:

UIATarget.localTarget().frontMostApp().mainWindow().searchBars() 

这似乎不是有效的获取方法。是否有用于 UIAElement 的获取方法的主列表(例如 .buttons()、.views()、.listViews())或者是否有一般规则? UISearchBars 的正确获取方法是什么?

最佳答案

引用在这里: http://developer.apple.com/library/ios/#documentation/DeveloperTools/Reference/UIAutomationRef/_index.html#//apple_ref/doc/uid/TP40009771

UAISearchBar 继承自 UIATextFields,因此您可以在其中找到“searchBars”方法。

关于ios - 是否有用于获取子元素(即 window.buttons() )的 iOS 自动化引用主列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16990545/

相关文章:

ios - 使用 HCYoutubeParser 播放 YouTube 视频

iOS : How do I slide a list item to expose commands (w/storyboards)

cocoa-touch - 使用 Core Data 最有效的方法是什么?

ios - UIBezierPath 的快速替代品,用于将大量正方形绘制到自定义 View

ios - 将重新训练的数据转换为 .pb 格式的 ios 相机示例?

ios - 如何使用 Cognito 通过移动集线器对用户进行身份验证?

iphone - 限制UITextview的行数

linux - 使用熔岩运行测试用例

automated-tests - 导入失败的测试结果后,在 TeamBuild 中构建状态为成功

selenium - 带复选框的下拉列表,需要选择和取消选择具有选择功能的复选框并使用 Selenium 获取关联值