cucumber javascript enabled features inside vagrant cucumber javascript enabled features inside vagrant selenium selenium

cucumber javascript enabled features inside vagrant


I think that all drivers require X, to be installed.So on linux server I do not have how do it.

Other way it using Firefox from host machine via selenium remote.It mean javascript will be run on remote Firefox on any machine.

Remote Selenium WebDriver not responding to Cucumber tests

http://code.google.com/p/selenium/wiki/RubyBindings

It work.

Run selenium server on host

java -jar selenium-server-standalone.jar

Changes in spec_helper.rb

require "selenium-webdriver"profile = Selenium::WebDriver::Firefox::Profile.newprofile["network.http.use-cache"] = falseCapybara.register_driver :firefox_host do |app|Capybara::Selenium::Driver.new(app,    :browser => :remote,    :url => 'http://10.0.2.2:4444/wd/hub',    :desired_capabilities =>   Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile))endCapybara.server_port = 9300Capybara.app_host = 'http://localhost:9300'Capybara.javascript_driver = :firefox_host

Changes in Vagrantfile

config.vm.forward_port 9300, 9300


You may want to try running firefox headless.

http://www.alittlemadness.com/2008/03/05/running-selenium-headless/

This way, you can run tests without seeing them as well.


I ran into a similar issue. Try ssh'ing into your VM and executing xhost + from the command line. This disables access control and allows clients to connect from any host to access your display.

Also, you might need to export DISPLAY=:0 as well, because the webdriver will default to using this display when it launches Firefox.