Micro Focus QTP (UFT) Forums
How to paste file location in QTP - 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 paste file location in QTP (/Thread-How-to-paste-file-location-in-QTP)



How to paste file location in QTP - camillelola - 08-09-2018

Recently I am facing a crazy problem. There is one test case in QTP (QuickTest Professional) to copy one file path from my c drive to the application. The location of the destination area is

PHP Code:
Browser("Modify").Page("Modify").ActiveX("Java Plug-in 11.161.2").WinObject("SunAwtCanvas"

and first I need to identify the coordinate of this area. I have tried using getroproperty("X") but it can't work out.
Code to copy-paste the file
Code:
Set WshShell =CreateObject("WScript.Shell") WshShell.SendKeys "^c"
Browser("Modify").Page("Modify").ActiveX("Java Plug-in 11.161.2").WinObject("SunAwtCanvas").Click 1,1
Browser("Modify").Page("Modify").ActiveX("Java Plug-in 11.161.2").WinObject("SunAwtCanvas").highlight
Browser("Modify").Page("Modify").ActiveX("Java Plug-in 11.161.2").WinObject("SunAwtCanvas").Click WshShell.SendKeys "^v"

Can anyone tell me how to locate this destination area so that I can paste my file name and location there? Note: it's not a text-area.

Thanks & Regards
Camillelola