Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
selenium with ruby rails and webrat
Tamil Ramasmy
5/27/2009 3:00:00 PM
Hi,
I have set up selenium and webrat with cucumber and ruby rails in Cygwin
on Windows DOS machine. I have everything working expect that when I
'rake' features, selenium is not starting up any firefox browser.
I have attached my sample project for the same. When I do 'rake
features' I get the below error. It looks like the script itself is
getting executed and not being validated by selenium.
Unfortunately, I am not a ruby developer and naive wrt selenium.
==========================================================================
$ rake features
(in /cygdrive/c/work/comcast/workspace/cucumber-test-pro)
/usr/bin/ruby.exe -I
"/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.7/lib:lib" -S rcov --rails
--exclude osx\/
"/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.7/bin/cucumber" -- --format
pretty features/google_search.featu
Feature: When I am on google page, i should be
able to search any string
Scenario: Search a string in google #
features/google_search.feature:4
==> Waiting for Selenium RC server on port 4444... Ready!
Starting app server
Given I am on google page #
features/step_definitions/google_search_steps.rb:13
Connection refused - connect(2) (Errno::ECONNREFUSED)
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize'
/usr/lib/ruby/1.8/net/http.rb:560:in `open'
/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
/usr/lib/ruby/1.8/net/http.rb:542:in `start'
/usr/lib/ruby/1.8/net/http.rb:1035:in `request'
/usr/lib/ruby/1.8/net/http.rb:845:in `post'
/usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
(eval):2:in `visit'
./features/step_definitions/google_search_steps.rb:2:in `/^I am on
google page$/'
features/google_search.feature:5:in `Given I am on google page'
Then I should be able to search some string #
features/step_definitions/google_search_steps.rb:17
1 scenario (1 failed)
2 steps (1 failed, 1 skipped)
76.6% 2 file(s) 69 Lines 47 LOC
rake aborted!
Command failed with status (1): [/usr/bin/ruby.exe -I
"/usr/lib/ruby/gems/1...]
(See full trace by running task with --trace)
===============================================================================
Attachments:
http://www.ruby-...
attachment/3740/cucumber-te...
--
Posted via
http://www.ruby-...
.
1 Answer
Tamil Ramasmy
5/27/2009 3:51:00 PM
0
Hurry, I got this solved. One of my colleague pointed out this forum
which solved my issue.
I modified webrat gem source code to fix this. However, I didnot try
webrat config option. I wanted to play with working selenium for some
time.
Forum :::::
http://formatinternet.wordpress.com/2009/04/27/cucumber-selenium-webrat-an...
THanks!
Tamil Ramasmy wrote:
> Hi,
> I have set up selenium and webrat with cucumber and ruby rails in Cygwin
> on Windows DOS machine. I have everything working expect that when I
> 'rake' features, selenium is not starting up any firefox browser.
>
> I have attached my sample project for the same. When I do 'rake
> features' I get the below error. It looks like the script itself is
> getting executed and not being validated by selenium.
>
> Unfortunately, I am not a ruby developer and naive wrt selenium.
>
> ==========================================================================
> $ rake features
> (in /cygdrive/c/work/comcast/workspace/cucumber-test-pro)
> /usr/bin/ruby.exe -I
> "/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.7/lib:lib" -S rcov --rails
> --exclude osx\/
> "/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.7/bin/cucumber" -- --format
> pretty features/google_search.featu
> Feature: When I am on google page, i should be
> able to search any string
>
> Scenario: Search a string in google #
> features/google_search.feature:4
> ==> Waiting for Selenium RC server on port 4444... Ready!
> Starting app server
> Given I am on google page #
> features/step_definitions/google_search_steps.rb:13
> Connection refused - connect(2) (Errno::ECONNREFUSED)
> /usr/lib/ruby/1.8/net/http.rb:560:in `initialize'
> /usr/lib/ruby/1.8/net/http.rb:560:in `open'
> /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
> /usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
> /usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
> /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
> /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
> /usr/lib/ruby/1.8/net/http.rb:542:in `start'
> /usr/lib/ruby/1.8/net/http.rb:1035:in `request'
> /usr/lib/ruby/1.8/net/http.rb:845:in `post'
> /usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
> /usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
> (eval):2:in `visit'
> ./features/step_definitions/google_search_steps.rb:2:in `/^I am on
> google page$/'
> features/google_search.feature:5:in `Given I am on google page'
> Then I should be able to search some string #
> features/step_definitions/google_search_steps.rb:17
>
> 1 scenario (1 failed)
> 2 steps (1 failed, 1 skipped)
> 76.6% 2 file(s) 69 Lines 47 LOC
> rake aborted!
> Command failed with status (1): [/usr/bin/ruby.exe -I
> "/usr/lib/ruby/gems/1...]
>
> (See full trace by running task with --trace)
> ===============================================================================
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
selenium with ruby rails and webrat
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password