I've just had a very quick poke around and although I think that the  
code ought to allow you to do this in the manner you are doing, I  
don't think it is implemented for Firefox. I think there should be an  
options() method on the Firefox class / instance (didn't pay much  
attention) to support this, with this used for configuration options.  
FireWatir actually takes the options through the constructor method  
right now.

Instead, try this for the time being:

b = => 20)

I have raised WTR-315 for this issue; but if wrong am happy to be  
corrected and the bug closed.

FYI: I've got patches in my GitHub fork to get rid of the timeout  
value in a future release - instead using a connection timeout during  
which period we retry connecting. See the development list archives  
for more information. If the patch is accepted, then hard-coding this  
value for the present is not really an issue.


On 20 May 2009, at 22:27, Alan Ark wrote:

> Hi listers.
> I’m running Ruby 1.8.6
> Watir 1.6.2
> On Windows XP
> I’m trying to override the :waitTime option that is seen on  
> firewatir-1.6.2\lib\firewatir\firefox.rb by using an external .yml  
> file to config my system.
> The easy way is just to modify Firefox.initialize and hard code the  
> value (line 134 of firefox.rb), but it seems that setting the value  
> via a yml config should be do’able too.
> Ideally, I would like to use something like this
> require 'Watir'
> Watir.options_file = 'Q:\\Ruby\\Data\\browser_options.yml'
> # New FF window appears with a 20 second connection timeout, instead  
> of the normal 2 second timeout
> with the following optionfile settings
> browser: firefox
> waitTime: 20
> to load up all the options for use in FireFox – specifically set the  
> default timeout for trying to connect to FireFox.
> I’ve done some investigation to see how the options are sent to  
> FireWatir, but I’m afraid that I’m missing something.  Also seeing  
> if this is the long way around, or am I on the right track?
> Some things that I tried:
> Modified watir/browsers.rb to send in :options => [:waitTime] when  
> using Firefox
>             Modified watir/options.rb to add_choice named :waitTime  
> of :type => :integer and :default => 10
> Modified firewater/Firefox.rb -  initialize to puts waitTime – so I  
> can see the current value
> I’m pretty sure that I need to find out how to send in :waitTime to  
> Firefox.initialize, but I’m unsure on how to accomplish this.
> Thanks
> -Alan
> Alan Ark | QA Manager| Complí | | office:  
> 503.294.2020 x106 | fax: 503.294.1200 |
> >

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to
Before posting, please read the following guidelines:
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to