IE7 introduced some new properties to show when ajax requests were completed. I 
can take a look and see how useful those wuld be.

would something like the following make more sense?

# button click causes ajax request
ie.button(:name , 'ff').click

# wait for ajax request to finish
ie.wait_for_ajax_requet_to_finish

ie.select_list(..).exist?  # returns true hopefully



or should the existing wait methods be extended to encompass ajax functionality?

Paul

  ----- Original Message ----- 
  From: Prema Arya 
  To: [email protected] 
  Sent: Thursday, February 01, 2007 11:52 PM
  Subject: Re: [Wtr-general] Watir with Ajax


  You can wait in a loop till the select box is loaded or use some kind of 
indicators like in gamil the top right corner of window reads "Loading..." when 
the mails are being loaded. 



  In your case you can wait for the control itself 



  #while the control exists is false sleep

  while(!ie.select_list( :name , "criteria[1][type_id]").exists?)

  sleep(2)

  end



  #the select box is loaded now 

  go ahead with other operations.



  If some text is displayed on the page as result of ajax call, you can also 
check for that 



  while(!isMessageDisplayed("text displayed on page"))

  end

  #The Ajax control is loaded

  end



  Hope this helps.



  Prema




  On 2/2/07, Naga Harish Kanegolla <[EMAIL PROTECTED]> wrote:
    I can't send a link to my application as it is in my local host. I am sorry 
for this.

    The "select"  option will be generating after i click on the link. Its ajax 
stuff. So that select can't be shown in the html. It is generating after the 
whole page is loaded. So wat should be done for such type of application?? 
    ---------------------------------------------------------------------
    Posted via Jive Forums
    http://forums.openqa.org/thread.jspa?threadID=6378&messageID=18056#18056 
    _______________________________________________
    Wtr-general mailing list
    [email protected]
    http://rubyforge.org/mailman/listinfo/wtr-general




  -- 
  Prema Arya 


------------------------------------------------------------------------------


  _______________________________________________
  Wtr-general mailing list
  [email protected]
  http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to