1

i'm having problem trying to upload in IE 11 with autoit

This is the python code that i used:

filePath = "file_to_upload.txt"
autoit.control_focus("Choose File to Upload","Edit1")
autoit.control_set_text("Choose File to Upload","","Edit1",filePath)
autoit.control_click("Choose File to Upload","","Button1")
driver.find_element_by_xpath('//*[@id="fileUpload"]').send_keys(filePath)

when i run my python script, i got this issue:

File "C:\Users\gc54734\Desktop\Automation\Python\importar_ok_DFT.py", line 61, in autoit.control_focus("Choose File to Upload","Edit1") File "C:\Program Files (x86)\Python\Python36-32\lib\site-packages\autoit\autoit.py", line 84, in wrapper raise AutoItError(err_msg) autoit.autoit.AutoItError: Window/Control could not be found

i'm trying this too, without success (file upload windows is opened, but the file is no chosen):

driver.find_element_by_xpath('//*[@id="fileUpload"]').send_keys(filePath)

autoit.win_activate("Choose File to Upload")
autoit.control_set_text("Choose File to Upload","","Edit1",filePath)
autoit.control_click("Choose File to Upload","","Button1")

Could you get me an extra hand with this?

1 Answer 1

1

It has been 8 months, but I had similar problem. Solution is to add 5 second sleep between clicking on button and looking for open window.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.