Thank you Taha,

I would be fine to check the current state of the client pool of ajax
connections.
But I'am afraid the condition depend on the way Prototype manage his pool.
I guess it will failed when T5.ajax (TAP5-999) will be ready to call.
Gasp!


2011/7/2 Taha Hafeez <tawus.tapes...@gmail.com>:
> Hi Francois
> I googled about waitFor... methods and found
> this http://agilesoftwaretesting.com/?p=111
> The waitFor methods get messed up as the page that three zones which were
> refreshing. So, I created two separate tests
> also i replaced the checkZoneValues() method to
>    private void checkZoneValues(String zone, int times) throws Exception
>    {
>       for(int i = 1; i <= times; ++i)
>       {
>          //Wait for ajax call to begin
>
>  waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount
> != 0", "20000");
>
>          //Wait for ajax call from end
>
>  waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount
> == 0", "20000");
>
>          //Check the value changed
>          assertText(zone, String.valueOf(i));
>       }
>    }
> It first waits for a ajax call to begin and then waits for it to end and
> then checks the value. So it will be good enough for even a slow server (20
> seconds wait)
> Thanks Igor for pointing it out and very very thanks Francois for adding
> this patch
> regards
> Taha
>
> 2011/7/2 françois facon <fra.fa...@gmail.com>
>>
>> Thanks for your advise Igor.
>> I will change that test.
>> Regards
>> François
>>
>> 2011/7/2 Igor Drobiazko <igor.drobia...@gmail.com>:
>> > It's highly likely that this wait condition will break the build once
>> > the
>> > build machine is busy. You should make use of Selenium's wait
>> > conditions.
>> > Check out the wait methods like waitForElementToAppear, etc.
>> >
>> > On Sat, Jul 2, 2011 at 12:14 PM, <ffa...@apache.org> wrote:
>> >>
>> >> +
>> >> +
>> >> +   private void checkZoneValues(String zone, int times) throws
>> >> Exception
>> >> +   {
>> >> +      Thread.sleep(300);
>> >> +      for(int i = 0; i < times; ++i)
>> >> +      {
>> >> +         assertText(zone, String.valueOf(i));
>> >> +         Thread.sleep(1000);
>> >> +      }
>> >> +   }
>> >> +
>> >> +}
>> >
>> >
>> >
>> > --
>> > Best regards,
>> >
>> > Igor Drobiazko
>> > http://tapestry5.de
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: dev-h...@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to