0
I am trying to use Selenium to make a python script to automate Twitter login. However, I am always getting this error: Unable to locate element. Any page element appears this error, I try to find by xpath.
My code:
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://twitter.com')
user = driver.find_element_by_xpath('//*[@id="react-root"]/div/div/div/main/div/div/div/div[1]/div[1]/div/form/div/div[1]/div/label/div/div[2]/div/input')
user.send_keys(afonsobritto)