- How do I upload a file using WatiN?
- Is it possible for this file to reside on a web server (as oppose to it being on user’s machine)?
Code snippet is highly appreciated. Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The file needs to be accessible to the client browser. That means it either needs to be on the client machine or accessible through a share. If you want to store files in a central location, either use a shared folder, or come up with a way to copy the file to the client when you need it.
As for uploading the file, that is going to depend on how you have to do it. If it uses a standard file input tag, it would work like this:
HTML snippet:
Code: