question

bonnet avatar image
bonnet asked JeffJ answered

How to use the function "matches" in xpath?

I want to use the function "matches" to do regular expression in xpath, but itest don't have the function. it just have "contains" function, but the "contains" function can't use regular expression,so I want to know whether iTest's Xpath support this function and how to use it. example: get all the input node that the name is number can i use the below expression or other else ? //input[matches(@name,{[0-9]+})]
iTestxpath
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JeffJ avatar image
JeffJ answered
iTest supports all XPath 1.0 functions. For an XPath language description, see http://www.w3.org/TR/1999/REC-xpath-19991116 iTest supports the following XPath functions: http://jaxen.org/apidocs/index.html
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.