macacajs / NoSmoke

A cross platform UI crawler which scans view trees then generate and execute UI test cases.
https://macacajs.github.io/NoSmoke
MIT License
198 stars 57 forks source link

NoSmoke支持设置控件的优先级别吗 #54

Closed boyxiaohua closed 6 years ago

boyxiaohua commented 6 years ago

比如进行到下单页面,必须点击同意协议才能点击下单这种场景

SamuelZhaoY commented 6 years ago

targetElements: 中声明的为高优先级触发控件, 如果一个页面中没有match 到targetElements: 中的元素,所有element 优先级一样. 需要进一步定制的话,可以使用hook

boyxiaohua commented 6 years ago

targetElements:中支持根据resource-id查找控件吗

SamuelZhaoY commented 6 years ago

https://github.com/macacajs/NoSmoke/blob/master/lib/crawler/crawler.js#L447 你所说的text 其实已经包含了 text, label, name, content 等等的几种属性了. resource-id 是安卓端特有的一个能力,目前优先级较低,但欢迎PR