|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Re: firing eventsI'm writing my own step to fire a KeyUp event using the following code snippet:
element.fireEvent(new Event(element, Event.TYPE_KEY_UP, key, false, false, false));
where:
- element is the Document element of an IFrame's page
- key is 'a'
However, the handler for that element's KeyUp event doesn't seem to get called. Is this supported in an IFrame?
wes
----- Original Message ---- From: Marc Guillemot <mguillemot@...> To: webtest@... Sent: Friday, June 20, 2008 2:32:34 AM Subject: Re: [Webtest] firing events yes and no. HtmlUnit can handle events for keystrokes, but WebTest doesn't currently provide any facility for that. This means that you have to write your own step / code snippet to call directly HtmlUnit's API. Cheers, Marc. -- Blog: http://mguillem.wordpress.com W C wrote: > I'm trying to test some interactive behavior that fires on every keystroke. > Can WebTest simulate keystrokes? Can I fire the KeyUp event for specific > elements (not necessarily form elements) on the page? > > wes > > _______________________________________________ WebTest mailing list WebTest@... http://lists.canoo.com/mailman/listinfo/webtest |
|
|
Re: firing eventsHi,
keyUp handling is supported on document. Are you sure that you're handler doesn't first wait for a keyDown and/or a keyPress? Cheers, Marc. -- Blog: http://mguillem.wordpress.com W C wrote: > I'm writing my own step to fire a KeyUp event using the following code > snippet: > > element.fireEvent(new Event(element, Event.TYPE_KEY_UP, key, false, > false, false)); > where: > - element is the Document element of an IFrame's page > - key is 'a' > > However, the handler for that element's KeyUp event doesn't seem to get > called. Is this supported in an IFrame? > > wes > > ----- Original Message ---- > From: Marc Guillemot <mguillemot@...> > To: webtest@... > Sent: Friday, June 20, 2008 2:32:34 AM > Subject: Re: [Webtest] firing events > > yes and no. > > HtmlUnit can handle events for keystrokes, but WebTest doesn't currently > provide any facility for that. This means that you have to write your > own step / code snippet to call directly HtmlUnit's API. > > Cheers, > Marc. > -- > Blog: http://mguillem.wordpress.com <http://mguillem.wordpress.com/> > > > W C wrote: >> I'm trying to test some interactive behavior that fires on every > keystroke. >> Can WebTest simulate keystrokes? Can I fire the KeyUp event for specific >> elements (not necessarily form elements) on the page? >> >> wes >> >> > > _______________________________________________ > WebTest mailing list > WebTest@... <mailto:WebTest@...> > http://lists.canoo.com/mailman/listinfo/webtest > _______________________________________________ WebTest mailing list WebTest@... http://lists.canoo.com/mailman/listinfo/webtest |
| Free Forum Powered by Nabble | Forum Help |