Sunday, July 3, 2011

Importance of WaitProperty method

We generally use WaitProperty with below syntax like
Object.WaitProperty "visible",1,10000

But assume i have a EditBox, and any data can be populated in this field. QTP should wait until it populated with data, and then proceed further after it populated with data. To handle these situations use below syntax:
Dim vEmpty 'Here vEmpty is uninitilized with any value, so it have empty value.
Object.WaitProperty "text",micNotEqual(vEmpty)

Common comparisons we use here are:
micGreaterThan
micLessThan
micGreaterThanOrEqual
micLessThanOrEqual
micNotEqual
micRegExpMatch

No comments: