So, I have a button on a website which opens a instance of file explorer and I want to automatically select a file with a given directory. How am I able to do this via python?
you cannot access file explorer using selenium, you have to use tools like autoit,
one work around is to send file path to input element and click submit button
driver.find_element_by_xpath("//input[@type='file']").send_keys(r"full/filepath")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.