Installation Watir - Error: `require': cannot load such file -- watir (LoadError)

1,127 views
Skip to first unread message

Ma St

unread,
Dec 26, 2014, 10:50:54 AM12/26/14
to public-...@googlegroups.com
I have read some of the posts for similar topics, but I am still receiving the following error when I run my test script.  I can use Selenium Web Driver, but am having trouble when I try to use a watir webdriver.  Is there also a way to use both selenium and watir webdrivers together?

Error:
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require':
cannot load such file -- watir (LoadError)
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:i
n `require'
        from test2.rb:5:in `<main>'

Test .rb File snippet:
#!/bin/env ruby
# encoding: utf-8
#!/usr/bin/env ruby

require "watir-webdriver"
require "watir-classic/testcase"
browser = Watir::Browser.new :internet_explorer


require "rubygems"
require "rspec"
require "selenium-webdriver"
require "rspec/expectations"
browser = Selenium::WebDriver.for :internet_explorer

Jakub Okoński

unread,
Dec 26, 2014, 12:19:57 PM12/26/14
to Ma St, public-...@googlegroups.com

Is it related to PA?

--
You received this message because you are subscribed to the Google Groups "Public Activity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to public-activi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ma St

unread,
Dec 26, 2014, 12:33:49 PM12/26/14
to public-...@googlegroups.com, ms3...@gmail.com
Hi.  This is related to installation of Watir.  I spoke with Watir user group and they stated they would try to improve documentation.  I had to run the following from my command prompt: gem install watir-webdriver.  I had done this for selenium-webdriver, but was not sure if the same was needed for Watir.  Also, in the code itself, I have to use @browser.driver if I want to access Selenium methods, etc.

Thanks.

Jakub Okoński

unread,
Dec 26, 2014, 12:35:26 PM12/26/14
to Ma St, public-...@googlegroups.com

This mailing list is for discussing things related to the gem public activity. Your issues seem to not belong here.

Reply all
Reply to author
Forward
0 new messages