【发布时间】:2015-09-15 11:19:31
【问题描述】:
我知道 calabash 带有包含的 irb 功能,允许您查询页面上的对象。但是,这似乎很麻烦。
Appium 附带了一个出色的开箱即用应用程序,可让您轻松识别页面上对象的详细信息。
有人知道可以与 Calabash 一起使用的等效工具吗?
【问题讨论】:
标签: ios automated-tests calabash pageobjects
我知道 calabash 带有包含的 irb 功能,允许您查询页面上的对象。但是,这似乎很麻烦。
Appium 附带了一个出色的开箱即用应用程序,可让您轻松识别页面上对象的详细信息。
有人知道可以与 Calabash 一起使用的等效工具吗?
【问题讨论】:
标签: ios automated-tests calabash pageobjects
更新
Calabash 0.19.0 添加了几个控制台方法来帮助发现应用视图层次结构中的元素。
ids => List all the visible accessibility ids.
labels => List all the visible accessibility labels.
text => List all the visible texts.
marks => List all the visible marks.
tree => The app's visible view hierarchy.
flash => flash(<query>); Disco effect for views matching <query>
Reveal 是不错的选择。
Calabash 2.0 有 tree console command 可以移植到 Calabash iOS 0.x。
briar/irbrc中也有这些有用的方法
【讨论】:
您可以使用 Ruby 来拉取所有元素。我假设您使用的是 mac,以下是您需要逐步执行的操作:
【讨论】: