Hi Everyone
I've been stuck on trying to get rSpec / Capybara / Selenium working
together. I'm getting a strange error message that is not producing many
google results :(
Here I am trying to use Firefox 47.0.1 and selenium-wedriver 2.53.4
Relevant part of my Gemfile:
group :test do
gem 'database_cleaner'
gem 'shoulda-matchers', github: 'thoughtbot/shoulda-matchers'
gem 'rack_session_access'
gem "capybara"
gem 'capybara-screenshot'
gem "launchy"
gem 'selenium-webdriver', '2.53.4'
gem 'simplecov'
end
Config from spec/rails_helper.rb:
## CAPYBARA CONFIG
Selenium::WebDriver::Firefox::Binary.path =
"/usr/local/bin/firefox47.0.1-bin"
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(
app,
browser: :firefox,
desired_capabilities:
Selenium::WebDriver::Remote::Capabilities.firefox(marionette: false)
)
end
Capybara::Screenshot.prune_strategy = { keep: 10 }
Sample feature test (stripped down):
require "rails_helper"
feature 'Blah blah' do
background do
visit '/'
end
scenario 'blah blah blah', js: true do
expect(page).to have_content('Foobar Company Name')
end
end
Error Message:
An error occurred in an after hook
Selenium::WebDriver::Error::WebDriverError: *unable to start Firefox
cleanly, args: ["-foreground"]*
occurred at
*******/.rvm/gems/ruby-2.3.3/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/binary.rb:97:in
`cope_with_mac_strangeness'
I've seen similar error messages online, but not with the failed
["-foreground"] argument. I've tried a variety of gem versions and/or
Firefox versions.
--
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.