How can I upload the image in this line of code.
Detail, I need to click on the field where I'm going to upload the file, I can't use the command SEND_KEYS(file path)
Here's the code I'm using.
An alternative I found was pyautogui, but I didn't like it, because it uses the keyboard to execute the command.
foto = driver.find_element(By.XPATH, "/html[1]/body[1]/div[1]/div[1]/div[1]/div[1]/div[4]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[4]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/i[1]").click()
sleep(5)
pyautogui.write(r"C:\__Imagens e Planilhas Python\Facebook\Imagens\nome3.png")
pyautogui.press("enter")
screen that opens to upload the file