I have some tests case using which I'm checking that the proper error message appears when the text in certain fields is invalid.
One check for validity is that a certain text area element is not empty.
If this textarea already has text in it, how can I tell selenium to clear the field?
I used the below code:
driver.get_element_by_id('foo').clear_field()