So I changed this to:

def start_browser
  if WHICH_BROWSER == 'safari' then
    require 'safariwatir'
    requite 'watir'
    @browser = Watir::Safari.new
  else
    require 'web-webdriver'
    require 'firewatir'
    require 'watir'
    @browser = Watir::Browser.new(:WHICH_BROWSER)
  end
end

It works fine for safari but if I try it with firefox I get the
following error:

TypeError in 'Check that site registration works correctly should
register the user'
superclass mismatch for class UnknownObjectException
shared_functions_watir.rb:43:in `start_browser'


On Jan 29, 10:55 am, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
> On Fri, Jan 29, 2010 at 4:49 PM, QAguy <qablogm...@gmail.com> wrote:
> > def start_browser
> >  if WHICH_BROWSER == 'safari' then
> >    Watir::Browser.default = WHICH_BROWSER
> >   �...@browser = Watir::Browser.new
> >  else
> >   �...@browser = Watir::Browser.new(:WHICH_BROWSER)
> >  end
> > end
>
> To avoid problems, require just the gem you need, something like this:
>
> if WHICH_BROWSER == 'safari'
>   require 'safariwatir'
>   @browser = Watir::Safari.new
> end
>
> Željko

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Reply via email to