[Webtest] Javascript events revisited
Marc Guillemot
webtest@lists.canoo.com
Tue, 12 Jul 2005 13:50:44 +0200
Hi Tim,
> ...
> My main objective, for these tests, is not to test the UI. I am using
> WebTest as part of a larger functional test, to submit information into
> the application. It just happens that the form was designed to use the
> onkeydown() event. I suggested that they use onchange() but they
> (developers) do not care for this solution since the event is not
> triggered until the user moves focus out of the field. They consider
> this bad UI design.
>
> If both events are used and the user presses a key what is the effect?
> Both events or just one?
onkeydown and onchange are not triggered at the same time: onkeydown is triggered each time a key is ...down whereas
onchange is generally only triggered when the field loses the focus and its value has changed.
Marc.