Home > Software engineering >  python selenium send_keys error: list object has no attribute
python selenium send_keys error: list object has no attribute

Time:12-09

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

CodePudding user response:

Try:

browser.find_element(by=By.XPATH, value= '//*[@id="email"]').send_keys(mail)
  • Related