python selenium send_keys error: list object has no attribute

Question:

mail = '[email protected]'
username = browser.find_elements(By.XPATH, '//*[@id="email"]')
username.sendkey(mail)

AttributeError: ‘list’ object has no attribute ‘sendkey’

i just want to fill email elements with sendkey

Asked By: kuuk

||

Answers:

Try:

browser.find_element(by=By.XPATH, value= '//*[@id="email"]').send_keys(mail)
Answered By: R. Baraiya
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.