Micro Focus QTP (UFT) Forums
Math in object properties - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Math in object properties (/Thread-Math-in-object-properties)



Math in object properties - RR123 - 02-11-2012

I have a dynamically created object and I want to identify it by using the "Y" property of the object. The "Y" value changes, but it is always less than or equal to 77. So, in the object property "Y" I want to use something like "<=77", but I can't get it to work. I can't find the correct Regular Expression to use this either. Unfortunately this is the only property that is unique enough to work with. Does anyone know the best way to get this to work? Thanks in advance.


RE: Math in object properties - rajpes - 02-11-2012

Code:
set desc=description.create
desc("micclass").value="ClassNameOfYourObject"

set childs=b().p().childobjects(desc)
if childs(0).getroproperty("Y")<0 then b().p().childs(0).click