I am writing a watir script to test an upload form.
But the script does not automatically choose the file that is to be uploaded from my harddrive.
Instead I
@modal = @browser.driver.switch_to.alert #Switch to open windows modal
key_to_send = "C:\\Users\\singhku\\Calabash_doc.pdf" #Path and name of file
@modal.send_keys(key_to_send)
require 'win32ole'
wsh = WIN32OLE.new('Wscript.Shell')
wsh.AppActivate('Choose File to Upload') #Name of the modal that is open
wsh.SendKeys('{ENTER}')