'Send files on messenger

When I try to send any kind of files on messenger using python and selenium, i use the method sendKeys, but it does not work

driver = webdriver.Firefox(executable_path=r'C:\Program Files (x86)\chromedriver_win32\geckodriver.exe')

##Log In
driver.get("https://www.facebook.com/?locale2=es_LA")
email_input = driver.find_element_by_id("email")
password_input = driver.find_element_by_id("pass")
sleep(2.0)
email_input.send_keys("")
sleep(2.0)
password_input.send_keys("")
sleep(2.0)
LogInbtn = driver.find_element_by_xpath('')
LogInbtn.click()
sleep(5.0)

##PERFIL DE LA PERSONA
driver.get("https://www.facebook.com/francisco.cruz.12979")
sleep(6.0)


messageButton = driver.find_element_by_xpath('')
messageButton.click()

sleep(5.0)        

##send image
image_path = ""
image_input = driver.find_element_by_xpath('')
image_input.send_keys(image_path)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source