macaca icon indicating copy to clipboard operation
macaca copied to clipboard

XPATH中含有$美元符导致卡住的问题

Open yaniswang opened this issue 10 years ago • 3 comments

如果XPATH中有出现美元符,就会导致命令无响应,一直卡住。

XPATH如下:

//*[@resource-id="com.taobao.taobao:id/tl_tabs"]/android.widget.LinearLayout/android.support.v7.app.ActionBar$a[2]/android.widget.RelativeLayout/android.widget.ImageView

如果将美元符删除,卡住问题消失,立马就会报找不到对象。

美元符在XPATH中应该属于特殊符号,需要进行转义,估计是某个地方没有转义,导致出现这个问题。

yaniswang avatar Oct 31 '16 13:10 yaniswang

经过多次测试,把XPATH精简成如下:

正常://a 卡住://a$

yaniswang avatar Oct 31 '16 13:10 yaniswang

@yaniswang Did u tried with concatenation for XPath

sachinGirish avatar Apr 05 '17 10:04 sachinGirish

You can try the new version

xudafeng avatar Oct 15 '17 13:10 xudafeng