[Windmill-dev] How do I redirect alerts?
Adam Christian
adam.christian at gmail.com
Wed Jun 11 11:23:09 PDT 2008
Hey James,
This is a pretty common problem people run into, so the reWriteAlerts
function is available and working. I think the docs there are actually
out of date because this feature is very active.
Depending on how you are writing your tests, you can add a new action
in the IDE called reWriteAlerts, and this will redefine alert to
output to the output window instead of pop up in your face and break
your tests.
This used to require that you run this every time a new page was
loaded, but I added a feature to detect that this has been run and do
it for you, however looking through it shit morning I realized that
there is a typo in one of the variable names and won't work so I am
checking in a fix.
Now you should only have to call this function one time at the
beginning of your entire test run and you shouldn't see a single
alert, if you do for some reason -- before the action happens that
causes it call reWriteAlerts again just to make sure its set.
If you are writing your tests in JSON it looks like:
{"params": {}, "method": "reWriteAlert"}
I will update the wiki as well. Thanks for the email!
Adam
On Jun 11, 2008, at 12:03 PM, James wrote:
> I just started using windmill, and I have some tests hanging due to
> alert boxes. I read this page:
> http://windmill.osafoundation.org/trac/wiki/BookChapter-3-UsingWindmillIDE
> That says:
> > Suppress Javascript Alerts (Currently inactive, but can be done
> with the reWriteAlerts controller function)
>
> Is this setting still inactive? Also, where can I find
> documentation on the rwWriteAlerts feature? Thanks!
>
> James
> _______________________________________________
> Windmill-dev mailing list
> Windmill-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/windmill-dev
More information about the Windmill-dev
mailing list