'chrome file upload window in webdriver headless mode
I'm unable to control chrome file-upload window in selenium, so I use pyautoit, this works fine in desktop mode, but I need it to run in a headless linux container.
Is there any way to control it in headless mode? (its a single page app with a complex upload script I haven't figured out the internal post to work, hoping I can bypass it with selenium).
webdriver.find_element(By.XPATH, "//label[@class='button']").click()
time.sleep(2.0)
autoit.win_wait_active("Open", 5)
autoit.send(fname)
autoit.send("{ENTER}")
I'm using python 3.10.4, selenium 4.1.3
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
