I’m using Sahi for Test Automation of web application. I have to write a script for sahi for uploading a file. But unfortunately I don’t know the way. Can anybody please help me?
Share
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.
File upload can be a complex thing depending upon any validations you do on the upload. For a starter, you can try out the following:
Synatx:
eg:
_setFile(_file(“id”), “C:\abc\efg.jpg”, “formSubmit.jsp”);
If there are javascript validations on the file field, you can try this hack. Before submitting the file, change the field’s type to “text”, and then set its value. Eg.
This works for most of the cases. If you still get any error, you can post it here.
Thanks,
Vivek