Using a javascript-driven, automated web-app test tool, is the following possible using javascript? - the test tool runs via an hta to test a web application. - trying to completely automate the testing of the app, w/no manual user-interaction, whatsoever - one of the web pages contains a file upload field - would like to enter a filename into the file upload field's "text" box using script(s) (w/o clicking the "Browse" button). if direct editing of the file upload "text" box is not allowed, can javascript select a file from the file selection dialog that appears after clicking the "Browse" button? thanks so much in advance.
tluckett wrote: > Using a javascript-driven, automated web-app test tool, is the > following possible using javascript? > > - the test tool runs via an hta to test a web application. > - trying to completely automate the testing of the app, w/no manual > user-interaction, > whatsoever > - one of the web pages contains a file upload field > - would like to enter a filename into the file upload field's "text" > box using script(s) (w/o clicking > the "Browse" button). if direct editing of the file upload "text" > box is not allowed, can > javascript select a file from the file selection dialog that > appears after clicking the "Browse" > button? > > thanks so much in advance. You cannot manipulate the input type=file element via the browser DOM for security reasons and the enormous exposure for abuse. It is intended only for actual user interaction. The best you could do would be experimenting with a third party component like AutoItX. -- Michael Harris Microsoft MVP Scripting