Error while creating and instance of IE

138 views Asked by At

Hi all while I try to create an instance of IE I am facing the following error my system configurations Windows 7,64 bit

NameError: uninitialized constant Watir::IE
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'watir'
=> true
irb(main):003:0> ie=Watir::IE.new
NameError: uninitialized constant Watir::IE
    from (irb):3
    from D:/Ruby_1.8.7/lib/ruby/site_ruby/1.8/rubygems/specification.rb:630
irb(main):004:0>
1

There are 1 answers

0
Fabrice31 On

To launch a browser in watir, you shoul use :

b = Watir::Browser.new :ie
# or :ff or :chrome or :opera ... 

Note that for Internet explorer, you should download IEDriverServer.exe and add it to your path.