+2 votes
hello team,

In the below script ,

println(Isnumeric(bval)) is returning true,

but res1 =bval * 100 is failing error

"The expression operator cannot be used with the specified type of operand.    "

 

Window("xxx").EditBox("addBox").SetText("100")
bval  = Window("xxx")..EditBox("addBox").Property("Text")
 println(Isnumeric(bval))
res1 =bval * 100
println(res1)
asked Aug 18, 2016 in QA Wizard Pro by Deepthi

1 Answer

0 votes

Wrap the 2nd bval within an Integer() function. Like so:

Window("xxx").EditBox("addBox").SetText("100")
bval  = Window("xxx")..EditBox("addBox").Property("Text")
println(Isnumeric(bval))
res1 =(Integer(bval) * 100)
println(res1)

See if that works, works for me.I am running version 6.1.0

 

answered Aug 18, 2016 by trizzo (230 points)
248 questions
262 answers
106 comments
2,047 users