【发布时间】:2014-06-18 19:18:56
【问题描述】:
有没有办法使用通配符,例如* 在葫芦里 query?
例如query("TextView text:'My name is' * ")
【问题讨论】:
标签: android cucumber automated-tests android-testing calabash
有没有办法使用通配符,例如* 在葫芦里 query?
例如query("TextView text:'My name is' * ")
【问题讨论】:
标签: android cucumber automated-tests android-testing calabash
您可以使用LIKE根据Xamarin docs进行通配符搜索
e.g., "label {text LIKE 'C*ll'}"
您也可以使用CONTAINS,例如
query("TextView {text CONTAINS '(sn'}")
或ENDSWITH或BEGINSWITH
query("TextView {text BEGINSWITH 'R'}")
【讨论】:
text CONTAINS、text LIKE 和id LIKE 使用部分查询匹配,但我似乎无法使用contentDescription LIKE 生成任何查询结果。
Embed is a Cucumber method and is not available in this console.
contentDescription 根本不支持吗?