human
Clear text from textarea with selenium
assistant
Here is some code to if Selenium textarea element `foo` is not empty, clear the field

driver.find_element_by_id('foo').clear()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.