2 messages in com.canoo.lists.webtestRe: [Webtest] How to interact with Ja...
FromSent OnAttachments
Wang, Lisong16 Dec 2003 07:38 
Marc Guillemot16 Dec 2003 23:11 
Subject:Re: [Webtest] How to interact with Javascript pop up windows using Canoo webtes t? (newbie)
From:Marc Guillemot (mgui@yahoo.fr)
Date:12/16/2003 11:11:01 PM
List:com.canoo.lists.webtest

Hello,

as far as I know webtest can't currently handle javascript alert, prompt or confirm message boxes. But as it seems that httpunit can work with these basic javascript functionalities (cf http://httpunit.sourceforge.net/doc/javascript-support.html), it would therefore probably be possible to write some new webtest tasks to automate this.

Marc.

Wang, Lisong wrote:

Hi: I often have to interact with Javascript pop up windows to walk through my test case, can Canoo automate this part? If it can, would someone kindly show me how to do it with the following scenario? HTML page: <html> <body> <form action="http://www.google.com"> <input type="submit" value="Google" onclick="return confirm('Do you want to go to Google?')"> </form> </body> </html> Canoo test script: <testSpec name="submit a form "> <config ... /> <steps> <invoke ... /> <clickbutton stepid="Click the submit button" label="Google" /> ???? ... </steps> </testSpec> In other words, how to spec that let Canoo click on "Ok" or "Cancel" button on a javascript confirmation window?

Thanks,

Lisong Wang