I have a win forms app and I'm opening a webBrowser inside the app. I have to use the browser, since I'm automating the actual browser UI flow of the site. I hit a snag trying to upload a file. The input element type is "file" and, as I've discovered, the only way to populate it programatically is to hit the browse button and select the actual file from the "Choose File to Upload" dialog.
I found useful answers on the topic like: Uploading Files Not Working - Need Assistance
I tried using the above solution, but my code doesn't move beyond file.InvokeMember("Click");
. So basically, once the "Choose File to Upload" dialog opens, the code pauses and waits for the dialog to close. I'm not sure how to proceed from here. Would really appreciate help on this and maybe a better suggestion on dealing with <input type="file"..."
elements.