OK, I've raised WICKET-1808 to track it. If anyone's interested, the following seems to work. Define the following script on your page:
wicketAjaxBusy = function() { for (var c in Wicket.channelManager.channels) { if (Wicket.channelManager.channels[c].busy) { Wicket.Log.info("Channel " + c + " is busy"); return true; } } Wicket.Log.info("No channels are busy"); return false; } To wait for any AJAX calls to return, invoke the following Selenium API: selenium.waitForCondition("!selenium.browserbot.getCurrentWindow().wicketAjaxBusy()", "10000"); jk On Thu, Aug 28, 2008 at 06:26:09PM +0200, Matej Knopp wrote: > Probably not for 1.3/1.4. We could have something like that for 1.5 > (where the ajax pipeline is completely new). > > -Matej > > On Thu, Aug 28, 2008 at 6:23 PM, John Krasnay <[EMAIL PROTECTED]> wrote: > > I'm testing some Ajax-y Wicket pages with Selenium. One challenge I'm > > having is finding a good expression to use in Selenium's > > waitForCondition. Right now I wait for the results of the Ajax call, > > e.g. an appropriate element appearing, but it's sometimes difficult to > > get this right, e.g. if a component is being replaced. > > > > I think an ideal approach would be to hook into Wicket's Ajax channels > > and wait for them to be empty before proceeding. I've looked into > > wicket-ajax.js and it looks like I should be able to loop through > > Wicket.channelManager.channels and check the busy slot on each. > > > > Has anyone else tried this? Does it sound like a good approach? Would it > > be a good idea for wicket-ajax.js to provide a method for checking this? > > > > jk > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]