[Webtest] [dev] support for js confirm()...

Marc Guillemot webtest@lists.canoo.com
Mon, 22 Nov 2004 10:15:18 +0100


Hi,

I think that in a (near?) future, we should provide support for the javascript confirm() function. A natural way to 
handle it would be to have the possibility to write tests like:

<clicklink htmlid="myLink"/>
<jsConfirm accept="true"/>

The problem is that it would be quite difficult to implement currently. Indeed if the raised confirm() is a consequence 
of the clicked link, it would be necessary to handle it before having finished with the clicklink step. An other 
solution would be to have the <jsConfirm> nested in the <clicklink> but first it's not as natural and second all 
"action" steps (<clickXXX>, <setXXX>, ...) should accept it.

I think that the solution to the problem (for long winter nights) would be to use 2 threads, simulating the user (the 
webtest steps) and its browser (htmlunit), the first one performing actions on the second.

What do you think (I can develop more if needed)?

Marc.