I'm using COM to fill some fields on a webpage but I encounter a problem while trying to fill an input file dialog.
After the script clicks the "choose file" button and the Choose file window opens, it completely freezes and will only unfreeze if I manually close the window.
Here is an example script to reproduce the problem:
Code: Select all
ie := ComObjCreate( "InternetExplorer.Application" )
ie.Navigate("https://www.cs.tut.fi/~jkorpela/forms/file.html") ;Just example webpage with input file
ie.Visible := True
While ( ie.Busy || ie.ReadyState != 4 ) ; Waits for the webpage to finish loading
Sleep 10
ie.document.getElementsByName("datafile")[0].click()
Sleep 1000 ; wait window open
Send "file1.txt" "file2.txt"
Send {ENTER}