WatiN File Upload

Posted by James Jeffery on Stack Overflow See other posts from Stack Overflow or by James Jeffery
Published on 2010-06-17T21:00:49Z Indexed on 2010/06/17 21:13 UTC
Read the original article Hit count: 732

Filed under:
|
|

I've hit a snag. I am trying to use WatiN to upload a file. I can load the upload box, but it quickly disappears. The last line of my code at the moment is:

ie.FileUpload(Find.ById("profile_file")).Click();

It loads the dialog to select a picture but disappears. Is it possible to set the path of the box automatically example, load "C:/Desktop/image.jpg"?

Also, is it possible to wait for the upload to complete before continuing?

Help is much appreciated.

Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET