Micro Focus QTP (UFT) Forums
Manually adding to Obj. Rep? - 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: Manually adding to Obj. Rep? (/Thread-Manually-adding-to-Obj-Rep)



Manually adding to Obj. Rep? - Mukesh.Laxmidhar - 11-04-2010

Hi guys,

I have a problem where I have a macro that copies a text and I want to send that information to my Test in QTP and I figured I could do it with "ctr+v" into an InputBox created in my test.

I have been playing around with it and QTP complains that it cannot find the InputBox in Obj. Rep.

So my question is, how can I add a dialog box to ObjRep. manually since the dialog box created by the test is modal, it does not allow me to access Obj. Rep. window to identify it and add it.

Btw. is there a book for learning about this kind of stuff? Because right now the things that I learn are the things I stumble upon and post here or search on google.

Thanks and kind regards,
Mukesh L.


RE: Manually adding to Obj. Rep? - manishbhalshankar - 11-30-2010

If the InputBox is triggered from your qtp script like MsgBox then it is not possible to add that box to OR.


RE: Manually adding to Obj. Rep? - cdesserich - 12-02-2010

This wouldn't work anyway because the InputBox function pauses the script. So there is no way to execute the next line of the script until the InputBox is closed. If you want to get what is in the system's clipboard, use this:

Code:
Set cb = CreateObject("Mercury.Clipboard")
MsgBox cb.GetText



RE: Manually adding to Obj. Rep? - Mukesh.Laxmidhar - 01-17-2011

Thanks Manish and Cdesserich,

the code above worked like a charm thanks again.

Regards,
Mukesh