I have a python script that tries to upload a file from my PC to a web application. I press via WebDriver the specific upload button in the browser and then a Win7 explorer window opens for me to navigate and select the desired file to upload. How could I manipulate this window with pywinauto?
optional: could this be done in linux as well (with an appropriate library I suppose) ?
This is my sample code:
wd.find_element_by_css_selector("img.editLecturesButtons.fromVideo").click()
#switch to the lightbox
wd.switch_to_frame(int("1"))
#hit upload
wd.find_element_by_xpath("//*[@id='fileUpload']").click()
#TODO
import os,pywinauto.application
file = os.path.normpath("C:\Users\me\Desktop\image.jpg")
....