I want to use Selenium for automate a login in the website https://clientes.ecuabots.com/user/login
This is my code:
class EcuabotsTest(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome(executable_path='/mnt/c/Users/Barbara/Documents/Formación Continua/Selenium/chromedriver.exe')
driver = self.driver
driver.get('https://clientes.ecuabots.com/user/login')
driver.maximize_window()
#driver.implicitly_wait(15)
def test_search_email_input(self):
email_field = self.driver.find_elements_by_xpath('//*[@id="input-15"]')
email_field.clear()
email_field.send_keys('[email protected])
if __name__ == "__main__":
unittest.main(verbosity=2)
but when i try this way i have the error: AttributeError 'list' object has no attribute send_keys
I tried to use email_field = self.driver.find_element_by_xpath('//[@id="input-15"]') (singular) but i get this error: selenium.common.exceptions.NoSuchElementException: Message: No such element: {"method":"xpath","selector":"//[@id="input-15"]"
I tried the find email input with id, CSS selector and full XPath but it isn't work
I tried to use email_field[0].send_keys('[email protected]) but i get the first error again
Thank you very much beforehand for your help!