Calabash 求助:calabash-android 如何 touch fragment 中 textView

wmliu · January 08, 2015 · Last by 大东 replied at January 12, 2015 · 1288 hits

calabash-android 通过 console 控制台 可以 query("* marked:'充值'") 控件信息,但通过 touch 无法对控件进行触发操作。

请问是否需要切入焦点啥的?或者其它操作进行点击触发,请各位大侠赐教。

共收到 5 条回复 时间 点赞

id,text 都试过?都不行?

wmliu #2 · January 08, 2015 Author

多个 textView 使用相同 id,text 应该是中文,此处编码没显示出来。但都尝试了,都没有反应

你用 solo.searchfortext 方法看看能不能 search 到

wmliu #3 · January 12, 2015 Author

问题找到,详细看了下源码发现采用的是 imageview+textview 组合在一起,应该是直接定位 imageview 进行触发。

用 I touch the "充值" text 试试呗。
执行的是这一句话

tap_when_element_exists("* {text CONTAINS[c] '#{text}'}")
6Floor has deleted
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up