Since i'm a BDD fan these days, and i simply love writing cucumber's features, so there i was trying to get the bundled selenium example to run:
#$ git-clone git://github.com/aslakhellesoy/cucumber.git
#$ cd
#$ rake features
And i got stack trace screaming "/usr/lib/ruby/1.8/net/http.rb:560:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)" ... OOPS, seems that i've forgotten to install selenium & run selenium:
#$ sudo gem install Selenium
#$ selenium
And i see the console displaying positive dump:
java -jar /usr/lib/ruby/gems/1.8/gems/Selenium-1.1.14/lib/selenium/openqa/selenium-server.jar.txt
20:47:29.661 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b12
20:47:29.662 INFO - OS: Linux 2.6.27-7-generic amd64
...
#$ rake features
After getting some green steps, i got a stack trace ... Switching to my selenium console shows:
java.lang.RuntimeException: Firefox couldn't be found in the path!
Please add the directory containing 'firefox-bin' to your PATH environment
variable, or explicitly specify a path to Firefox like this:
*firefox /blah/blah/firefox-bin
...
Before do
@browser = Selenium::SeleniumDriver.new(
"localhost", 4444, "*chrome /usr/lib/firefox-3.0.4/firefox-3.0",
"http://localhost", 15000 )
@browser.start
end
#$ rake features
Arrgghh, this time selenium console hangs at:
21:00:29.455 INFO - creating new remote session
21:00:29.627 INFO - Allocated session 202cd7534d044c81a66e027960e3d79b for http://localhost, launching...
21:00:29.745 INFO - Preparing Firefox profile...
#$ cd /usr/lib/ruby/gems/1.8/gems/Selenium-1.1.14/lib/selenium/openqa
#$ sudo mv selenium-server.jar.txt selenium-server.jar.txt.orig
#$ sudo wget http://edwardotis.net/public_files/selenium/selenium_server_FF3/selenium-server.jar
And after restarting my selenium, and running the rake tasks, i'm assured i have the environment for writing features using cucumber+selenium :] ... 3 cheers !!
No comments:
Post a Comment