I am trying to use Selenium RC in my rails application. I first
install selenium RC ruby client (>gem install selenium-client). Then
create a “selenium_test.rb” in libs folder. In the file, I create a
@browser = Selenium::Client::Driver.new
:host => “localhost”,
:port => 4444,
:browser => “*firefox”,
:url => “http://www.google.com”,
:timeout_in_second => 60
In a controller file, I create an instance of this class.
When I run rails, it returns an error:
LoadError in LoginsController#create
no such file to load – selenium-client
I tried to add the following require settings in /config/
development.rb. No helpful.
gem “selenium-client”, “>=1.2.17”
I am new in Rails. It seems a quite simple task. I have some third-
party library and want to use in my code. In C#, I just add the
reference, then specify its namespace in the top of the file. It is
actually similar in Ruby code. But for Rails, I do not know how to
reference external lib. Could someone here help me? Really appreciate.