0 votes
QA wizard support XPath, why only Number works, not text?


query = "starts-with(1234,124)"

ans = Browser(foo).performXpathQuery(query)

ans(1) = false (correct)

this will work fine. return as false

but if

Query02 = "start-with(hello, f)" ' answer  should be false

ans = Browser(foo).performXpathQuery(query)

but answer is not correct :  ans(1) =  <-empty

or ans(1) = true ' even though it should be false

or scripts failed.

but as long as it number, the xPath works fine with it.


I know we just have the update which includes some compare, match function. But those are just basic string function in Xpath, I want to make the String Xpath work too,  to be flexible on the scripts.
asked Dec 19, 2016 in QA Wizard Pro by anonymous

1 Answer

0 votes
The XPath starts-with() function requires the strings to be quoted.
answered Dec 20, 2016 by Todd
254 questions
265 answers
3,530 users