Im trying to open up the link in my code , locate where it asks me to enter my email address and then enter in my email address and finally press enter. However I am getting an attribute error: 'list' object has no attribute 'send_Keys' and have no idea why.
Here is my code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
PATH = "/Users/Monkeys/Downloads/chromedriver"
driver = webdriver.Chrome(PATH)
driver.get("https://www.mytutor.co.uk/tutors/login/")
search = driver.find_elements_by_name("form:email:input")
search.send_keys("[email protected]")
search.send_Keys(Keys.RETURN)
driver.quit()
I have tried to find the element in other ways still getting the same error. I thought I had issues locating the element in the HTML code but that wasn't the issue. I simply have no idea what the attribute error in this context means. I would appreciate if I could get some assistance please.
driver.find_elements_by_namewill return a list. Either select the element you want in the list e.g.search[0].send_keysor usedriver.find_element_by_name(no s)