[Wtr-general] problem in accessing elements of web page

Paul Carvalho tester.paul at gmail.com
Fri Jan 12 10:00:30 EST 2007


Instead of ie.wait, I wrote and use the following method call:

  def wait_for_frames
      $ie.wait
      if $ie.document.frames.length > 0
          $ie.document.frames.length.times {|x| $ie.frame(:index, x+1 ).wait
}
      end
  end

I imagine others may use something similar.  You should be able to modify it
to suit your needs.

Cheers.  Paul C.


On 12/01/07, VIKASH KUMAR <vikashkumar051 at yahoo.co.in> wrote:
>
> I am running running a test case in windows platform.
>
> Some of the time page can't get downloaded fully, due to slow speed, then
> my code breaks, by giving message object not found - something like this.
>
> I tried *ie.wait,* but it is also not working for me as there are lots of
> frames in the page, page can get download but the elements inside the frame
> used to take time for downloading.
>
> If I use sleep 5, or sleep 10 then it works for me, but I want to avoid
> using sleep in my code, what should be the better approach of doing this.
>
> Please help me out.
>
> Thanks in advance
>
> Vikash
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070112/b915a068/attachment.html 


More information about the Wtr-general mailing list