Solved
Forum Discussion
UnveN
Staff
11 years agoHi Dev,
glad it was helpful. The only downside of this approach is that it does not emulate an actual user interaction. If you simply need to automate clearing of the field - go for it. But if you need to test that the field handles user input correctly then you better go for one of the Keys approaches mentioned above. This is because the field might have specific event handler functions attached ('onkeydown' for example) and that functions will not be called if you simply change the "value" property.
glad it was helpful. The only downside of this approach is that it does not emulate an actual user interaction. If you simply need to automate clearing of the field - go for it. But if you need to test that the field handles user input correctly then you better go for one of the Keys approaches mentioned above. This is because the field might have specific event handler functions attached ('onkeydown' for example) and that functions will not be called if you simply change the "value" property.