I'm trying to log in to this website but it's created with js, I think it is React which I have no experience.
This is an image of inspected code of the website that I try to log in.
I tried this...
email_field = browser.find_element_by_name('input_login_3kzbI')
email_field = browser.find_element_by_id('login-modal-email')
and then it should go this, but it fails on the line above...
email_field.send_keys("[email protected]")
CodePudding user response:
find_element_by_name
checks against name
attribute, and find_element_by_id
checks against id
attribute. There is no such attributes for the input
element, so it failed.
Try this: browser.find_element_by_xpath('//input[@qa-id="login-modal-email"]')