Watir

I been teaching myself Ruby for three months now and
I've needed very Little help until now. I've been
working with text files using strings, array's, hash's
and CSV all with Little problem

Now I've moved onto using the watir gem with no luck.
Unless I open www.yahoo.com or www.google.com I get
frame errors or the code will not exit. Am I just
missing something basic. Code same below.

#ie = Watir::IE.start("http://www.yahoo.com/") #works
#ie = Watir::IE.start("http://tv.yahoo.com/") #no exit
#ie =
Watir::IE.start("http://finance.yahoo.com/")#frame
error
ie = Watir::IE.start("http://www.nascar.com/") #no
exit

Jeff

···

____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222

Umm, did you require watir first?

Like this...

require 'watir'
$ie=Watir::IE.start("http://www.google.com")
$ie.text_field(:index,1).set("watir mailing list")
$ie.button(:value,/Seach/).click

require 'watir'
include Watir

ie = IE.new
ie.goto('http://finance.yahoo.com/'\)

This works for me.
Luis

···

On Aug 9, 10:44 am, Jeffrey Bowen <ja_bo...@yahoo.com> wrote:

I been teaching myself Ruby for three months now and
I've needed very Little help until now. I've been
working with text files using strings, array's, hash's
and CSV all with Little problem

Now I've moved onto using the watir gem with no luck.
Unless I openwww.yahoo.comorwww.google.comI get
frame errors or the code will not exit. Am I just
missing something basic. Code same below.

#ie = Watir::IE.start("http://www.yahoo.com/&quot;\) #works
#ie = Watir::IE.start("http://tv.yahoo.com/&quot;\) #no exit
#ie =
Watir::IE.start("http://finance.yahoo.com/&quot;\)#frame
error
ie = Watir::IE.start("http://www.nascar.com/&quot;\) #no
exit

Jeff

____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.http://tv.yahoo.com/collections/222

But it helps if you spell correctly...

mysource.sub!('Seach','Search')

Luis,
    Out of curiosity, have you found much advantage to including the
"include Watir" line?
Since it pretty much only saves me having to type "Watir::", and I
only type that once, I almost always omit the include.

--Kyle

Thanks I'll check the version I'm running. That's
the only other thing I can think of.

Jeff

···

--- "lrlebron@gmail.com" <lrlebron@gmail.com> wrote:

On Aug 9, 10:44 am, Jeffrey Bowen > <ja_bo...@yahoo.com> wrote:
> I been teaching myself Ruby for three months now
and
> I've needed very Little help until now. I've been
> working with text files using strings, array's,
hash's
> and CSV all with Little problem
>
> Now I've moved onto using the watir gem with no
luck.
> Unless I openwww.yahoo.comorwww.google.comI get
> frame errors or the code will not exit. Am I just
> missing something basic. Code same below.
>
> #ie = Watir::IE.start("http://www.yahoo.com/&quot;\)
#works
> #ie = Watir::IE.start("http://tv.yahoo.com/&quot;\) #no
exit
> #ie =
> Watir::IE.start("http://finance.yahoo.com/&quot;\)#frame
> error
> ie = Watir::IE.start("http://www.nascar.com/&quot;\) #no
> exit
>
> Jeff
>
>

____________________________________________________________________________________

> Sick sense of humor? Visit Yahoo! TV's
> Comedy with an Edge to see what's on,
when.http://tv.yahoo.com/collections/222

require 'watir'
include Watir

ie = IE.new
ie.goto('http://finance.yahoo.com/&#39;\)

This works for me.
Luis

____________________________________________________________________________________Ready for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/

When writing portable code, it is extremely helpful to include the full
namespace. I try to avoid using the include statement so that the code
is more portable and readable.

···

--
Posted via http://www.ruby-forum.com/.

That's the only real advantage. Of course in a script this short it is
not very useful. But in a longer script you may save a little time.

Luis

···

On Aug 9, 3:58 pm, "Kyle Schmitt" <kyleaschm...@gmail.com> wrote:

Luis,
    Out of curiosity, have you found much advantage to including the
"include Watir" line?
Since it pretty much only saves me having to type "Watir::", and I
only type that once, I almost always omit the include.

--Kyle

Jeffrey Bowen wrote:

Thanks I'll check the version I'm running. That's
the only other thing I can think of.

Jeff

This is kind of a side question...

I've used win32ole for kicking off IE before. What the advantage of
using watir, or is there one?

Thanks, Todd

···

--
Posted via http://www.ruby-forum.com/\.

watir provides a nicer interface than useing ie/ole directly
You will also be able to run your code against firefox with only a
minimal number of changes.

Paul

···

On Aug 9, 9:31 pm, Todd Burch <pro...@burchwoodusa.com> wrote:

Jeffrey Bowen wrote:
> Thanks I'll check the version I'm running. That's
> the only other thing I can think of.

> Jeff

This is kind of a side question...

I've used win32ole for kicking off IE before. What the advantage of
using watir, or is there one?

Thanks, Todd

--
Posted viahttp://www.ruby-forum.com/.