I am trying to login to Google with selenium. The steps are simple, first you type email and hit next, then you type password and hit next. My code looks like this:
driver = webdriver.Firefox()
driver.get("https://accounts.google.com/signin")
driver.implicitly_wait(3)
driver.find_element_by_id("identifierId").send_keys("email")
driver.find_element_by_id("identifierNext").click()
password = driver.find_element_by_xpath("/html/body/div[1]/div[1]/div[2]/div[2]/div/div/div[2]/div/div[1]/div/form/content/section/div/content/div[1]/div/div[1]/div/div[1]/input")
password.send_keys("password")
element = driver.find_element_by_id('passwordNext')
driver.execute_script("arguments[0].click();", element)
The first part of code (email part) works perfectly. I also checked the last part (hitting next after the password is written) and it also works great. The only problem is with password. when I try to do password.send_keys("password") it causes the following error:
TypeError: object of type 'FirefoxWebElement' has no len()
Any suggestions on what to do?