Watir: Facing problem with "IE.attach"

A

Anukul Singhal

Hi,

I tried the following piece of code:

require 'watir'

ie = Watir::IE.new
ie.attach("www.yahoo.com")

Getting the following error:

undefined method 'attach' for #<Watir::IE:0x90edef0> (No Method Error)

I know the goto method and the start method can navigate me to the
desired url but what I want to do is this:

1. I want to first check if there is any open browser already existing.
2. If it exists, I want to attach a url to it.
3. If it does not exist, then I want to create a new instance and
navigate to the desired url using goto.

Can anyone please help me in getting this troubleshooted?

Thanks,
Anukul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top