I keep seeing the confusion all the time over this topic. Please fill in the survey below and write your detailed comments regarding what action (if any) you take when you see that ‘valediction hat’ in QTP test results.
Please write your views in the comment form below.
Hi Veeranki Naveen,
QTP will first go for the mandatory and then assistive. If both these do not identify the object uniquely then approach is SI.The SI has 2 types namely base filter and optional filter.Then lastly come the Ordinal identifier.
I ALWAYS use some custom functions I have to dynamically identify all objects and script runtime. I have NO Object Repository, and never have to deal with descriptive programming. If I was using QTP to fill this form it would literally be:
Set B = Browser….
myFunc(B, “author”).Set “my name”
myFunc(B, “email”).Set “my email”
myFunc(B, “url”).Set “website”
myFunc(B, “comment”).Set “my comment”
Hi Ankur,
I have two questions on Object identification one for runtime from application and other for QTP reference for Object Repository.
QUESTION 1 : (During Run Time)
I have a confusion on the sequence of the Object Identification followed by QTP during runtime. What is the sequence QTP follows when the object is not identified uniquely by the Description (Mandatory & Assistive) of Object Repository ? Will QTP jump to Ordinal Identifier or Smart Identification ? Please describe ?
Question 2: (While Recording)
One more question is regarding the learning of Objects for the first time while recording for Object repository .
While recording if the Object is not recognised uniquely by the configured Mandate and Assistive properties then what does QTP do ? As far as I am confirmed it goes for Ordinal Identifier but I have a silly question do QTP uses Smart Identification for “”learning objects for OR”” ?
Appreciate your reply.
Regards,
Naveen,
naveen.351986@yahoo.com
Its my experience that while creating the test scripts, we should not use SI. But, while running those scripts, we can enable the SI.
Important point here is, one should make sure by checking the results, every time you run the scripts that, no object has been identified using the SI. i.e., you don’t see any warnings or the black hat in the results.
Incase any object in the AUT is identified using SI, immediately you need to check the properties of that object and make sure if QTP has identified any incorrect object. If not, you need to make a note of those extra or assistive properties which QTP has used through SI to identify the required object and update the OR.
If you take these precautions, SI become very useful in executing your scripts in a smooth way and also help you in identifying any changes made to the objects in the AUT, in a simple manner.
Please correct me if you find anything contradictory in my explanation.
Thanks
Ramakrishna I agree your comments. its not good use the smartidentification, folks i suggest you to don’t use the smartidentification and make necessary changes in the directly repository objects
Thanks
John
I think we should always make Smart Identifiacation as False in the Object Repository for that field.I just want to give one example for this scenario where i faced a problem with Smart Identification.
In the web site which i used for tesing, there is one field present and was added to object repository with smart Identification as True, here i am testing for field excistence. In one intermediate release they have removed this field from the website, when i ran the automated test the check point was passed because smart identification was enabled.When i made smart identification as False then it is working as Expected.
I make necessory changes in object properties in OR/Description.
When QTP Uses the “Smart Identification” to Identify the Object, It is a Clear Indication that
1) There is no object exactly matching with its physical description in OR (or)
2) There are more than one objects exactly matching with the physical Description.
But QTP Used the SI Process to complete the execution process.
So it is our responsibility to Review the Object Physical Description and take a decision
1) Either to continue testing with the change in that Object Properties
2) Or to Report a Message
In fact i never liked to use Smart Identification, I always try to turn it off while running the script. I will have my object definition to be able to identify the objects with its properties or Ordinal Identifier
Hi,
I too dont use smart identification rather choose to get the object identified properly. As SI may be intelligent way QTP recongizes the most suitable object to work on, but its the scripter who has to ensure that object is identified properly with various methods of object identification techniques.
regards,
Karthik
Changing the Smart Identification to False will not help basically as it reduces the performance of script.
If a Test Object is getting Identified with smart identification , user has to do the following steps
1. In Object Identification Setting User has to define set of Mandatory and Assistive Properties for the Particular Test Object.
2.Disable Smart Identification for Particular Test Object.
3. Then Add the Test Object to Repository.
Incase if an object is getting added with out defining the properties and disabling the smart identification script execution will be slow since it uses smart identification to identify test objects.
I dont go for SI. I use some mandatory properties to identify those objects
I turn dumb identification off in my automated tests. If you implement a smart automation framework the built-in sales pitch ideas can be avoided.
Adding/modifying assistive and mandatory properties for object, for which smart identification got invoked.
I change the assistive and mandatory properties from the object identification options.
That is a Smart Identification icon for the missing object. This icon indication that the Smart Identification mechanism successfully found the object, and information on the properties used to find the object. You can use this information to modify the test object description, so that QuickTest can find the object using the description in future run sessions.
In the Test Results Window when you see hatman icon,it means that QTP used Smart Identification.Once you see that click on it and copy the Object properties to Object Repository and save the test.Doing this QTP will not use SI next time when its done.
I i follow smart identification .It’s really useful when designer make necessary changes to the page design, we may not be aware of the changes and when error strikes then we get scared .So smart identification becomes handy in order to cope up with this problem.As it lets us know which property of the objects has currently undergone the change process,hence, we can make necessary adjustment on our scripts..
I would like to keep smart identification so that my test passes. Once I see any SI I change the object properties by modifying the existing properties or adding new properties whatever is adequate.
I will update the object properties in the object repository.. if i get tht warning..
From the resuly we would identify SMI is used by QTP.If my test passes with SMI I would leave the object property without making any change.
But would add checkpoint to check whether the code passes everytime and would execute without interruption
Hi friends & readers,
we have two ways to handle this scenario
1. We need to change the Objective Properties “Enable Smart identification” = False once its is added to repositery.
2. We need to remove the selection of “Disable Smart Identification during the run session” from Run tab under testing settings from File menu.
But friends is there any option to disable the property of Smart Identification before objects adding to object repositry.
the test will shown with warning mode in result window .here we came to know that QTP has used smart identification.
Can i user on single function to check Username and Password functionality for different sites in QTP
Update the object in the object repository so that smart identification is no longer utilized by the reference. What usually works is to simply delete the object from the repository and then add it again.
If I see the SI Hat in the result, I first disable the SI for that Object in Object Repo* (TO) Properties by selecting ‘False’, Next step is to use Regular Expression (If Applicable) & list the properties from Assistive Propeties List (Step by Step), to make the Object unique on that page & finally running the script to check the changes.. Even after the above steps, SI hat appears, Then, I prefer to use Descriptive Programming or XML Sheet
you should disable SI while creating your test cases. So that you are able to recognize the objects that are dynamic or inconsistent in their properties. When the script has been created, the SI should be enabled, so that the script does not fail in case of small changes. But the developer of the script should always check for the test results to verify if the SI feature was used to identify a object or not.
I have an idea about this concept. However please let me know how to use this concept in Framework
can we use this concept in Framework scripting?
Please solve me on this problem.
Let’s say a single button is used for login and logout. and user has clicked login and before the login frame displays the button shows logout and user is clicking the logout button which is inactive. And here this logout button is identified by QTP through smart identification, which it should not as the logout is not enabled.
If smart identification for an object is true, one should make it false to identify the object more accurately.
I generally try to turn off smart identification for the object. Then regularize the object to identify it without smart identification.
If I see when the object using smart identification, I will check the report to see what properties it used to identify that particular object and what are the properties it ignored. And then I will change the Object properties accordingly in the Object Repository.
If Smart Identification is called then it means that object for which Smart Identification is called, is not identified by the QTP properly, so I make the set of identifing properties (TO Property) is such a way that the object is identified properly.
Thanks,
Devendra Sharma
I will consider that QTP has identified the object using the properties which is not coming under mandatory and assistive properties section..Smart identification only required in the case of objects which does not support through the regular(Mandatory and assistive) properties
When I encounter smart identification, I usually get a warning in my test report and try to avoid those warnings by checking what additional properties QTP used to identify my object along with my regular mandatory properties and if needed I will update the object property from the option ‘update from application’.
disable smart identification for the object(make it False) which i add so that it doesnt take extra time in identifying the object if there are similar objects with a unique identification property
I prefer not to use smart identification. I make necessary changes to object properties to make sure it is identified with out it.
I would first use maintenance run mode
and follow that with test object identification which i would store in the repository
Then rerun and refine.