Answer the question
In order to leave comments, you need to log in
How to insert text in Selenium?
Python selenium.
I used to write on old versions, there was a good search for elements. There you could easily insert data into the input field using the send_keys() method.
Now, in the new version, an error occurs (purely a warning, the code continues to work), that you need to use this search otherwise.
This code will find me the login input field. The clear() method has remained and seems to be working, but how to transfer something now?
I didn’t see anything in the documentation, but I don’t want to install the old version
driver.find_elements(By.NAME, "username")
Answer the question
In order to leave comments, you need to log in
driver.find_elements("xpath" , "Путь к xpath").send_keys("Текст")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question