Seems that nobody - except Søren (thanks) - was particularly interested :-(

Starting with build 1719, setInputField simulates the keystrokes rather
than setting the field value directly. This allows keydown and keyup
handlers (if any) to be triggered as needed (for instance on Google's
start page). It is not possible anymore to set the field value without
to trigger these handlers as would occur when the value is paste in the
field. If the need arises, the possibility may be added.

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com


Marc Guillemot wrote:
> Hi all,
> 
> some users have reported recently that the WebTest examples using Google
> didn't work anymore.
> After some investigation, I've found that there is really a reproducible
> JS error on Google's start page and that WebTest was right!  I've
> blogged about this if you're interested by the details:
> http://mguillem.wordpress.com/2008/09/10/why-google-should-better-use-htmlunit/
> 
> The cause of the JS error is that WebTest currently uses
> setValueAttribute(...) and not type(...) to set a value on a text field.
>  The consequence is that on Google's page the keypress handlers are not
> called as they would when the text is typed. On the other side, setting
> the value directly is nearer to pasting the value (with right mouse
> click for instance) which is valuable as well.
> 
> Now the question: what should be done in <setInputField.../>?
> - use type(...) to simulate typed text (and therefore trigger JS handlers)
> - keep setValueAttribute(...) as it is today (allows to better simulate
> pasted text)
> - allow both? But which one should be the default and how should the
> other option be selected?
> 
> I wait for your comments.
> 
> Cheers,
> Marc.

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to