Clear text from textarea with selenium (Python)

Clear text from textarea with selenium (Python)

As shown clearly in the script for this example, to clear what is written in a text area using the Selenium WebDriver you need to use element.Clear() where element is the text input.

query = self.driver.find_element_by_name("search")
query.send_keys("Hello World")

Leave a reply

Your email address will not be published. Required fields are marked*

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
1 + 0 =

Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.