Micro Focus QTP (UFT) Forums
QTP not recognizing objects sometimes - 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: QTP not recognizing objects sometimes (/Thread-QTP-not-recognizing-objects-sometimes)



QTP not recognizing objects sometimes - bharadwajk - 09-19-2012

Hi,

I need a favour from you guys, my QTP script is configured to open up a website, check for the content (that I fed into Object Repository) and accordingly throw a FAIL or PASS based on whether the content is found or not.

However, the script sometimes recognizes the content and at times cannot, and hence I receive false FAILURE alerts for unknown reason. Here's a bit of code snippet that causing irregular failures. Please assist.

Code:
If  Browser("ABC").Page("XYZ").Exist(0) Then
   If Browser("ABC").Page("XYZ").Image("header_app_title").Exist(0) Then
    sMsg = "Ineos Credit Control Tool page launch successful"
    sStatus = True
   End If
Else
  sMsg = "Ineos Credit Control Tool page launch failed"
  sStatus = False
End If



RE: QTP not recognizing objects sometimes - bharadwajk - 09-19-2012

Guys, pls assist. The false alerts are causing lot of chaos. Assistance is greatly appreciated.


RE: QTP not recognizing objects sometimes - ricks_ngl - 09-20-2012

Check if the image is always spyable manually.

If the object is manuall spyable always, then check if the image exist after loading the page by increasing the time..

Eg.
Code:
If Browser("ABC").Page("XYZ").Image("header_app_title").Exist(10)
Then

If the object is always not spyable manually, then check if any java/.net/any other add in is required..and install it and use it. You will be able to proceed well.

Thanks,
Ricks