I\'ve recently run into a problem working with selenium where calling clear()
on a custom text box causes issues when entering text later in the test. The text
The clear()
method executes an "Automation Atom", which is a JavaScript function intended to provide the smallest basic unit of automation functionality for a browser. In the case of clear()
, that function sets the value
property of the element to an empty string (''), then fires the onchange
event on the element. The atoms function you're interested in is bot.action.clear()