I have such an element that allows me to upload a file by clicking:
<a class="gray_box" href="#">Choose world folder<span>Select the world folder, we'll do the rest</span></a>
The problem is that when clicked, it calls the file manager screenshot
first I did the download like this:
import pyautogui
button = wait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "[href='#']"))).click()
pyautogui.write(<path>)
pyautogui.press('enter')
but this does not allow me to upload the file in headless mode
because the path is inserted directly into the console and the "confirmation window" is called, which has to be confirmed manually
how do I make a file upload to work in headless mode?