Translate

Exist method in QTP

This method will wait for a specified duration to check weather the object exists in Application under test. Accordingly return a boolean value.

Syntax:

TestObject.Exist(intTimeOut)

Return Type: Boolean

This will wait & check for the existence of TestObject for specified seconds. It returns true if it finds the object during that time or false otherwise.

This method does not check the child objects existence.

To explain it better, please see below a sample code

If Browser("Browser").Page("Page").WebEdit("Test").Exist(10) Then
          <<your code here>>
Else
         <<Your code here>>
End If



Subscribe to Quality Assurance Knowledge Base! by Email

No comments :

Post a Comment