[Rails] getting selenium working with jruby/sinatra/cucumber/webrat on windows
I am trying to run cucumber/webrat with Sinatra on Jruby 1.7.3 (1.9.3) on Windows.
It seems to work ok, but when I try to add selenium to webrat. I get the error shown below.
It seems like it thinks it is in a linux environment or something as the error happens when it tries to start selenium server and there is a "&" at the end of the argument chain. I took a look at capybara but had some other similar incomprehensible problem there where the stack dump seemed to go on for ever until it ran out of memory. I just want a way to test the javascript aspects of the sinatra server content.
features/support/env.rb
ENV['RACK_ENV'] = 'test'
require 'rubygems'
require 'rack/test'
require 'rspec/expectations'
require 'webrat'
require "selenium/client"
require File.join(File.dirname(__FILE__), '../../', 'main.rb')
Webrat.configure do |config|
# config.mode = :rack
config.mode = :selenium
config.application_port = 4567
config.application_framework = :sinatra
end
class WebratMixinExample
include Rack::Test::Methods
include Webrat::Methods
include Webrat::Matchers
Webrat::Methods.delegate_to_session :response_code, :response_body
def app
# Sinatra::Application
Main
end
end
World{WebratMixinExample.new}
====================================
> When I run cucumber I get
>unrecognized argument &:
Usage: java -jar selenium-server.jar [-interactive] [options]
-port <nnnn>: the port number the selenium server should use
(default 4444)
-timeout <nnnn>: an integer number of seconds before we should give
up
-interactive: puts you into interactive mode. See the tutorial for
more details
...
...
Exception: java.lang.ThreadDeath thrown from the UncaughtExceptionHandler in thr
ead "Thread-8"
←[31mGiven I am viewing the admin page←[90m # features/simple_example.rb:6←[
0m←[0m
←[31m Error while running >>java -jar "c:/jruby-1.7.3/lib/ruby/gems/shared/
gems/webrat-0.7.3/vendor/selenium-server.jar" -port 4444 -timeout 5 &<< (Runtime
Error)←[0m
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2f5b0b31-10ac-4431-84b6-86ce262dc822%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home