I can't insert a value in field text in html formulary using Selenium Python:
I have this HTML:
<div data-react-toolbox="input" class="_2dBwA"><input type="text" placeholder="Endereço de e-mail" class="_2WvFs" role="input"><span class="fT1WI"></span></div>
and this XPath:
(Copy Xpath) //*[@id="root"]/div/div[2]/div[2]/div/input
and this:
(Copy outerHTML) <input type="text" placeholder="Endereço de e-mail" class="_2WvFs" role="input">
I did it, but dont worked:
[In]: login_name = 'Cassandra'
[In]: insert_login_name = driver.find_element_by_xpath('//input[@id="root"]')
[In]: insert_login_name.send_keys(login_name);
[Out]: NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@id="root"]"}
After entering the text in this text field, the result would be in html 'values' = 'Cassandra'
<div data-react-toolbox="input" class="_2dBwA"><input type="text" placeholder="Endereço de e-mail" class="_2WvFs _3QmiH" role="input" value='Cassandra'><span class="fT1WI"></span></div>
What can i do? I'm new in that. Thanks