Micro Focus QTP (UFT) Forums
How to add objects to repository, if QTP is not generated scripts automatically - 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: How to add objects to repository, if QTP is not generated scripts automatically (/Thread-How-to-add-objects-to-repository-if-QTP-is-not-generated-scripts-automatically)



How to add objects to repository, if QTP is not generated scripts automatically - iamsekhar - 07-27-2010

My application was developed in .net and WPF
Question: When i am trying to click on File->New, the QTP is not generating script.
2. But when i do object spy on menu item, I can able to see properties

How to add objects to repository in above scenario to make it work.

Kindly do the needful.
sekhar


RE: How to add objects to repository, if QTP is not generated scripts automatically - PrabhatN - 07-27-2010

Hi Sekhar,

You can add these objects using "Object Repository Manager" under "Resource" option if you want to prepare a shared object repository. Otherwise you can add these to Local Repository using "Object Repository" under "Resource" option. Then you can code according to your requirement using these objects.

If it still doesn't work then you can make use of shortcut key. For e.g. to open a new file, let say you type ALT+F and then O, then following code should help you,

Code:
set WshShell = CreateObject("WScript.Shell")
WshShell.sendkeys "%"+"F"+"O" (Here % is spl. character for ALT)

You can learn more about sendkeys method in Help file of QTP.