Hi,

Did you started Firefox with '-jssh' option before running the script? In the current implementation, creating an object of Firefox class doesn't open a new instance of Firefox. So you need to manually start Firefox and then run the script.

Regards,
Angrez

On 3/29/06, Rodrigo Julian Martin <[EMAIL PROTECTED]> wrote:

Thanks Bret!

 

I've tried the code:

 

require 'watir'

browser = Watir::Firefox.new

browser.goto(" http://google.com")

 

And the output was:

 

c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize': No connection could be made because the target machine actively refused it. - connect(2) (Errno::ECONNREFUSED)

            from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `new'

            from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize'

            from Untitled.rb:2:in `new'

            from Untitled.rb:2

Execution completed with exit code 1.

 

Any help will be really appreciated, thanks in advance! I guess this has something to do with the –jssh parameter, Am I Wrong?

 

Regards

Rodrigo Julian Martin

 


From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Bret Pettichord
Sent: Martes, 28 de Marzo de 2006 09:18 p.m.


To: [email protected]
Subject: Re: [Wtr-general] [FIREWATIR] Specifying which browser will be used?

 

Try this

browser = Watir::Firefox.new

Bret

On 3/28/06, Rodrigo Julian Martin <[EMAIL PROTECTED] > wrote:

Hi Angrez, thanks for the quick reply!

 

I've tried the code:

 

require 'watir'

browser = Firefox.new     #You need to create new Firefox instance. Rest will remain same.

browser.goto(" http://google.com")

 

and when I run it, this was the output:

 

Untitled.rb:2: uninitialized constant Firefox (NameError)

Execution completed with exit code 1.


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to