[Wtr-general] Scroll IE

jkohl at telusplanet.net jkohl at telusplanet.net
Thu Oct 13 12:02:00 EDT 2005


> I've tried the scrollIntoView method by calling it on my
> global $ie object as so
> $ie.scrollIntoView
> and also by calling it on the button I want to scroll into view
> 
> $detailsFrame.button(:name, /nextAction/).scrollIntoView
> 
> but to now avail. I get the following errors. Would this means its
> been deprecated?
It's not a Watir method, it's part of the Internet Explorer API, and it is used
by Watir methods we call. It might not be working for buttons, so we should look
at that. If it isn't scrolling into view automatically when you click a button,
there is an issue with the Watir code.

> Could I be so bold as to ask another question? Its regarding the IRB? 
> I've been through the manual and it says that to run a script using the irb
> you simply pass the script file as an argument to the irb process, however,
> the process then quits and finishes once it's completed the script. 
> I was hoping it would run the script to the scripts completion and then
> allow me
> to take over once the script was finished? My script is a TestCase, could
> this be the reason? 
I'm afraid I don't completely understand the question. What manual are you
using? The Watir User Guide has a small section on IRB, but there is a lot of
info in Ruby manuals, and probably in Bret's Scripting 101 where you could be
getting this from. 

Are you running IRB from the command line, and wondering why the console closes
when the script is finished? I tend to run saved scripts from the command line,
and use IRB for interactive work with Ruby, or using the Watir library. If it
helps, this article shows how to drive IE using IRB:
http://www.kohl.ca/articles/watir_works.pdf 

Sometimes I write a script that takes me to a certain location of the web
application, and then I take over by hand. If Internet Explorer is closing, I
would make sure there isn't an "ie.close" method in the script. I generally run
all my scripts from the command line by typing in the name of the script and
hitting enter.

Hope that helps.

-Jonathan




More information about the Wtr-general mailing list