Micro Focus QTP (UFT) Forums
Can not identify the object - 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: Can not identify the object (/Thread-Can-not-identify-the-object)



Can not identify the object - Anum Saleem - 02-09-2012


I'm using QTP 9.2. While running script i got this error repeatedly

Cannot identify the object "Login1$Password" (of class WebEdit). Verify that this object's properties match an object currently displayed in your application.

When i run the script for first time it runs perfectly but now this error occurred. I have tried all the possible solution check object properties through object repository and object spy and enable smart identification invokes:
object not unique (3 objects found) or object not found..

There is no mismatch in the properties and i also try changes the values to regular expression and also added ordinal identifier
problem is still there



RE: Can not identify the object - Ankesh - 02-09-2012

Can you delete the old object and add the new one? Sometimes you can't figure out what went wrong with the object.

Plz post if you still face the issue.


RE: Can not identify the object - Anum Saleem - 02-09-2012

I have use the update from application button but it solve the problem in some cases, when i run the script again it generate this error again

Add the new object did not solve the problem


RE: Can not identify the object - Ankesh - 02-09-2012

Plz paste ur code and the snapshot of the object spy for that object.


RE: Can not identify the object - Anum Saleem - 02-09-2012

Code:
Browser("Browser_2").Page("Login Form").WebEdit("Login1$Password").SetSecure "4f3349487fff5e22744f606d"
Browser("Browser_2").Page("Login Form").WebEdit("Login1$UserName").Set "madeeha"
Browser("Browser_2").Page("Login Form").Image("Login1$LoginButton").Click 54,13
Browser("Browser_2").Page("Softronic Applications").Image("HCMS HR").Click
Browser("Softronic - HCMS_2").Page("Softronic - HCMS").Link("Employee Profile (Basic)").Click
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_2").WebButton("New").Click
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_3").WebEdit("txtFirstName").Set "Ahmed"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_3").WebEdit("txtLastName").Set "Bilal"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").WebEdit("txtEmail").Set "ahmed.bilal@gmail.com"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").Image("crttxtDOB$CalendarImgCalendar").Click 8,6
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").WebEdit("crttxtDOB$CalendarTxtDate").Set "01/01/1986"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").Image("imgCNICExpiry").Click 7,9
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").WebEdit("txtCNICExpiry").Set "02/01/2014"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").WebEdit("txtCNIC").Set "655214479332"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").WebEdit("txtNIC").Set "98566332201"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").WebEdit("txtFatherNIC").Set "65214489633"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_4").WebButton("Job Specification Information").Click
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_5").Image("Find").Click
Browser("Lookup_2").Page("Lookup").Link("Select").Click
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_6").Image("Find").Click
Browser("Lookup_2").Page("Lookup").Link("Select_2").Click
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_7").Image("txtJoiningDate$CalendarImgCale").Click 9,7
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_7").WebEdit("txtJoiningDate$CalendarTxtDate").Set "01/01/2011"
Browser("Softronic - HCMS_2").Page("Softronic - HCMS_8").WebButton("Save").Click



RE: Can not identify the object - Ankesh - 02-10-2012

ok.. Disable smart identification.

In OR Test object detail section, click on the '+' sign(green color) and add few more properties of the object such as name, id etc.

I hope this will help. And if you get the error more than one object was found, plz use the index property as well.


RE: Can not identify the object - Anum Saleem - 02-10-2012

Ok Thanks,
Disable smart identification solved the problem for that particular object.
When im recording script for any other form this error occur again or when im running the script for 2nd time it will appear again..Is there any QTP .net add in problem that QTP not recognizing objects??