Take the 2-minute tour ×

I have the Problem with the File Upload window. When I used it the first time it works perfect but when I call the same functionality to open and upload a File the open button (in the "Choose File to Upload" Dialog) is pressed to fast. So the Test can not write the complete path of the File over set and so the I can not open the File.
The Source Code of the function:

public void OpenFileDialogAndUploadCsvFileWithName(string fileName, IE editPage)
           var fileUploadDialog = editPage.HtmlDialog(Find.ByTitle(PageTitle));

            FileUpload fileUpload = fileUploadDialog.FileUpload(Find.ById(new Regex("_FileUpload")));
            Image image = fileUploadDialog.Image(Find.BySrc(new Regex("/icons/upload.png")));
            Element parentElement = image.Parent;


The Upload File Dialog is open from Internet Explorer Modal Dialog Window.

share|improve this question
add comment

1 Answer

You might find that the file upload dialog handler is running on a different thread, and that is why you don't get a chance to enter your text.

If that is not he case, and it really is a problem with the dialog handler then I would grab the code for the fileUploadDialog handler and create my own, custom, slower version.

share|improve this answer
add comment

Your Answer


