file upload - 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: file upload (/Thread-file-upload) |
file upload - Laura_F - 01-19-2012 Hello, in my test I will upload a file. This is my code: Code: Browser("...").Page("..").WebFile("..").Click Now when I run the test the problem is that a other file instead of test.docx is choosen from my C drive. In every run it is another random file. It is not possible to type the path directly in the WebEdit. I selected the file in the dialog after clicking the Browse button. Do somebody know whats the issue? Many Thanks. RE: file upload - ravi.gajul - 01-19-2012 Please check if the below thread helps. https://www.learnqtp.com/qtp-unable-to-identify-browse-upload-buttons/ RE: file upload - Laura_F - 01-19-2012 Thanks, i just have seen this suggestion. But that doesn´t work. Any other ideas to solve this issue? RE: file upload - Ankesh - 01-20-2012 Can you try the below code to upload the file... Code: Browser("...").Page("..").WebFile("..").Object.text="C:\text.docx" Regards, Ankesh RE: file upload - Laura_F - 01-20-2012 Run Error: Object doesn't support this property or method: 'Browser(...).Page(...).WebFile(...).Object.text' After selecting a file maually I checked via object spy the identification properties. As you see in the attached file there is the value property where the path is set. Therefore i tried Quote:Browser("...").Page("..").WebFile("..").Object.value="C:\text.docx" When I run the test the field is empty and no value is set. The WebFile isn´t editable, is that the issue? Thanks and Regards |