[Webtest] How to interact with Javascript pop up windows using Canoo webtes t? (newbie)

Wang, Lisong webtest@lists.canoo.com
Tue, 16 Dec 2003 10:38:23 -0500


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