Scripting File Upload Boxes
I helped someone today who was trying to record a web form that performed a file upload. File uploads are handled using an INPUT tag of type FILE. Unfortunately it turns out that these can’t be scripted for security reasons. Microsoft has prevented applications from setting the value property of these types of object. The solution was to send keystrokes to the Internet Explorer window to simulate a user entering the file name in the file box. You can view a demonstration of how to modify the WebRecorder code to handle this here.