Micro Focus QTP (UFT) Forums
How to regularize values in Numerical properties like width, height? - 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 Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: How to regularize values in Numerical properties like width, height? (/Thread-How-to-regularize-values-in-Numerical-properties-like-width-height)



How to regularize values in Numerical properties like width, height? - anil2u - 06-05-2012

Hi

I use height & width properties extensively to identify objects, as they remain stable in my app. I had a scenario where the width can be 299 or 300. I clicked on the property in ObjectRepository(OR) and its showing range instead. So I created a parameter (using Value Config Options) in the datatable and given this expression (299|300). This is not working and the object is not identified.

Please guide me how this works. Let me know if any info. is required

Thanks


RE: How to regularize values in Numerical properties like width, height? - supputuri - 06-05-2012

Regular expression is not possible for X,Y,ab_X and abs_Y properties in the OR.

You have to handle this case in your script....

Let me know if you need any more info on this.


RE: How to regularize values in Numerical properties like width, height? - anil2u - 06-06-2012

Hi Supputuri,

Thanks for the reply. Actually my scenario is simple. I have a Ad frame whose size can vary between 300x250 or 299x249. Both of these cases are correct and there aren't many properties to identify this object except for 'title:=Ad'.

So the option I have now is to create a desc obj of title:=Ad and get all the child objects, retrieve the height & width and check for the range.

Correct me if i am wrong or if dr is any alternative way.

Cheers