1

I have this code:

website code

Enter Username or Email

elem = driver.find_element_by_id("id_username")
elem.send_keys(user)

Enter Password

elem = driver.find_element_by_id("id_password")
elem.send_keys(pwd)

Login

driver.find_elements_by_xpath("//*[contains(text(), 'Autentificare')]")
keyboard.press(Key.enter)
keyboard.release(Key.enter)

I can't manage to get this login info sent in order to login on platform

Please help

Thank you

1

1 Answer 1

2

driver.find_elements_by_xpath("//*[contains(text(), 'Autentificare')]") will return a list, unnecessarily.

Probably you need to find the submit button and press it.

driver.find_element_by_css_selector("button[type='submit']").click()

or

driver.find_element_by_css_selector("button[type='submit']").send_keys(Keys.ENTER)
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.