Try using:

ie.wait( noSleep = false )

On Jun 15, 9:38 am, asheesh misra <asheeshmisr...@gmail.com> wrote:
> Hi All,
>
> I am a newbie in Ruby.
>
> I am trying to write script that logs in to my mail account and deletes all
> mails in the Junk Mail folder.
> When I execute the script, it opens the site in a new IE window (I have IE
> 7), but does not move any forward. I see that in the browser window, the
> page opens correctly but always shows 1 item remaining in the status bar,
> indicating that the page has not loaded fully. Ruby makes an implicit call
> to wait() function whenever we open a site, preventing the script to move
> ahead before the page is fully loaded. Here, this function spells doom as
> the script enters in to an infinite wait. The page never loads completely,
> always showing 1 item remaining in the status bar and the script due to
> implicit call to wait() function, keeps waiting for the page to load fully.
>
> Does anyone has a solution/ workaround for this?
>
> I have appended the full script for your perusal. I will be grateful for a
> timely and genuine solution or guidance.
>
> Regards,
>
> Asheesh
>
> #--------------------------------------------------------------------------­-----------------------------------#
> #
> # Assignment : To login, access mail and delete the junk mail.
> #  Creator : Asheesh Misra
> # Details : Test will Login to mail Account, go in the junk mail section and
> delete all mails on the page.
> #
> #--------------------------------------------------------------------------­----------------------------------#
>
>    require 'watir'   # the watir controller
>          # set a variable
>    test_site ='www.rediff.com'
>    Login='qwerty'
>    password='abcde'
>     # open the IE browser
>    ie = Watir::IE.new
>    # print some comments
>    puts "## TestCase : Delete Junk Mail"
>    #i=0
>    #while i<3
>     #ie.goto(test_site).sleep(40)
>     #break
>     #end
>     ####The problem is here###
>     ie.goto(test_site)
>    ##################
>    #ie.wait
>    #sleep 30
>
>    ie.text_field(:name, "login").set(Login)
>    ie.text_field(:name, "passwd").set(password)
>    ie.button(:class,"gobtn").click
>    #ie.send_keys("{Enter}")
>    ie.wait()
>    ie.getlink(:name,"Go to Inbox").click
>    ie.getlink(:name,"Junk Mail").click
>    ie.wait()
>   ie.checkbox(:name,"selectall1").click
>   ie.button(:name,"del").click
>   ie.getlink(:name,"Logout")
>   ie.close()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to