I am using Selenium and AutoIT to upload images to a site. Now I need to choose a file from the "File Upload" Window in Firefox and click Enter. So this is the AutoIT part of the code:
driver.find_element_by_xpath("/html/body/div[2]/div/div[2]/div/div/ul[1]/li/button").click()
autoit.win_wait_active("File Upload", 5)
autoit.send(os.path.join(mpath,"1.jpg"))
autoit.send("{ENTER}")
This script works fine Now the problem is the Window needs to be active on my computer in order for the file to be uploaded and so I cannot do any other work while the script is running. How do I send the same data without making the window active?
<input>
and not the button. It is documented and I've also tested it may times. – Florent B.