Tom Hamilton Stubber Tom Hamilton Stubber - 2 months ago 10
Python Question

Selenium inserting <br> tags

I am trying out selenium at the moment and am using it to insert text into fields that are saved into a MySQL db. However, it seems to be adding a

tag at the end of the string.

For example, my line:

driver.find_element_by_id("griddescription").send_keys("Add item test Desc")

Add item test Desc<br>
into the database.

Any ideas?


I had forgotten to use the .clear() command first so the
tags were already there to begin with.


I wasn't .clear()-ing the field before I inserted the text so the data was going in after the already present