UFT:不单击其中有括号的列表项
UFT: Not Clicking the Listitem that has brackets in it
Browser("Create case").Page("Create case").WebElement("innertext:="&SubCategoryExcel ,"index:=1").Click
上面代码中的Webelement其实就是一个自定义的下拉框。它工作正常我传递给它的所有 innertext
。但是当 innertext
中有括号时。它不起作用。
例如:innertext:=issues (waiting for communication from primary or secondary decoder)
在描述性编程中,该值被视为正则表达式。因此,您需要通过在特殊字符前加上反斜杠来转义特殊字符
尝试以下值
issues \(waiting for communication from primary or secondary decoder\)
Browser("Create case").Page("Create case").WebElement("innertext:="&SubCategoryExcel ,"index:=1").Click
上面代码中的Webelement其实就是一个自定义的下拉框。它工作正常我传递给它的所有 innertext
。但是当 innertext
中有括号时。它不起作用。
例如:innertext:=issues (waiting for communication from primary or secondary decoder)
在描述性编程中,该值被视为正则表达式。因此,您需要通过在特殊字符前加上反斜杠来转义特殊字符 尝试以下值
issues \(waiting for communication from primary or secondary decoder\)