Object pointer from Repository to Application - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Object pointer from Repository to Application (/Thread-Object-pointer-from-Repository-to-Application) |
Object pointer from Repository to Application - mollkoff - 12-01-2011 Dear All, I have this set up : 1. A frozen WEB application, no changes is being made 2. A QTP script with one action 3. A local Repository 4. Method used for scripting . record and play (not analog) 5. Default set-up used in Qtp 10.0 The problem is, that , when I run the scripts, sometimes I will have the error ; "object not found". The object can be found in the repository but not in the application. I repair by "update from application", but the problem can occur afterwards. Can anyone tell me, what the reason for this this loss of pointer to the apllication is, and how I can avoid it to happen ? Mollkoff RE: Object pointer from Repository to Application - bdash_10 - 04-16-2012 Hi, Verify the property of the object which is not found by QTP in the application. Try using Property-Value pair. Please provide some more information if this doesnot help. RE: Object pointer from Repository to Application - sshukla12 - 04-16-2012 Hi, It might be the synchronization issue. Since u are using record and play, u must be navigating between pages. Application takes time to load the page and its objects but qtp moves to the next line of code and try to find out the object . So its better to use .sync property. Let me know if its worked 4 u or not. Regards, Sankalp RE: Object pointer from Repository to Application - nilanjans - 05-03-2012 Hi, You can try with the following: when the error message pops up Stop the run Process. then select the object from the Object Repository and click on button "Highlight it in the application". If it able to find the object in the application then it is supposed to recognize the object in the runtime too. If the object not found in the application that means that object not yet populated in that application by that time . This might happen, because of wait property. That specific object might not have loaded by that time. so give sync or Wait property and again run the script. And one thing, the application should be opened after QTP is opened, other wise it might not recognize any of the objects. Hope above will help. Regards, Nilanjan. RE: Object pointer from Repository to Application - ravs@788 - 06-05-2012 Hi Molkoff, Since you have mentioned that you repair by "update from application", it seems that the most probable reason your scripts are failing is that your objects are dynamic. Check the object properties when the "Object Not Found" error occurs. Compare this with the corresponding value in the Object Repository. If the values are different, then this is the issue. You can try using regular expressions to identify the objects. (However, this would work only if the object properties follow some pattern.) Just perform the above check and let us know the results. Thank You, Ravi Shankar |