Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
file upload
#1
Not Solved
Hello,

in my test I will upload a file. This is my code:

Code:
Browser("...").Page("..").WebFile("..").Click
Browser("...").Page("..").WebFile("..").Set "C:\test.docx"

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.
Reply
#2
Not Solved
Please check if the below thread helps.
https://www.learnqtp.com/qtp-unable-to-i...d-buttons/
Reply
#3
Not Solved
Thanks, i just have seen this suggestion. But that doesn´t work. Any other ideas to solve this issue?
Reply
#4
Not Solved
Can you try the below code to upload the file...

Code:
Browser("...").Page("..").WebFile("..").Object.text="C:\text.docx"


Regards,
Ankesh
Reply
#5
Not Solved
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


Attached Files Image(s)
   
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad Upload a file in Sap using QTP jason.hofmann@auspost.com.au 6 6,887 09-04-2012, 05:52 AM
Last Post: jason.hofmann@auspost.com.au
  "UPLoad attachment into QC using OTA" suresz449 0 3,936 02-16-2012, 04:26 PM
Last Post: suresz449
  Unable to Upload the results to QC from QTP. skmattey 1 4,108 11-14-2011, 04:39 PM
Last Post: Nisha M R

Forum Jump:


Users browsing this thread: 1 Guest(s)