Ben, I wanted to check in see if you were able to get it to work?
Ryan Felton 816.591.6257 [email protected] http://www.linkedin.com/in/ryanfelton On Thu, Jun 1, 2017 at 3:02 PM, Alan Da Costa <[email protected]> wrote: > Hi Ben, > > Just a few thoughts. > > 1. Have you tried a newer version of the selenium-webdriver gem (if > compatible)? I see several newer versions than 2.53.4 > > ➥ gem search selenium-webdriver -ra | grep -e "^selenium-webdriver (" >> selenium-webdriver (3.4.0, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.0, 3.0.8, >> 3.0.7, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.53.4, 2.53.3, 2.53.2, >> 2.53.1, 2.53.0, 2.52.0, 2.51.0, 2.50.0, 2.49.0, 2.48.1, 2.48.0, 2.47.1, >> 2.47.0, 2.46.2, 2.46.1, 2.45.0, 2.44.0, 2.43.0, 2.42.0, 2.41.0, 2.40.0, >> 2.39.0, 2.38.0, 2.37.0, 2.35.1, 2.35.0, 2.34.0, 2.33.0, 2.32.1, 2.32.0, >> 2.31.0, 2.30.0, 2.29.0, 2.27.2, 2.27.1, 2.27.0, 2.26.0, 2.25.0, 2.24.0, >> 2.22.2, 2.22.1, 2.22.0, 2.21.2, 2.21.1, 2.21.0, 2.20.0, 2.19.0, 2.18.0, >> 2.17.0, 2.16.0, 2.15.0, 2.14.0, 2.13.0, 2.12.2, 2.12.1, 2.12.0, 2.10.0, >> 2.9.1, 2.9.0, 2.8.0, 2.7.0, 2.6.0, 2.5.0, 2.4.0, 2.3.2, 2.3.0, 2.2.0, >> 2.1.0, 2.0.1, 2.0.0, 0.2.2, 0.2.1, 0.2.0, 0.1.4, 0.1.3, 0.1.2, 0.1.1, >> 0.1.0, 0.0.29, 0.0.28, 0.0.27, 0.0.26, 0.0.25, 0.0.24, 0.0.23, 0.0.22, >> 0.0.21, 0.0.20, 0.0.19, 0.0.18, 0.0.17, 0.0.16, 0.0.15, 0.0.14, 0.0.13, >> 0.0.12, 0.0.11, 0.0.10, 0.0.9, 0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3, >> 0.0.2, 0.0.1) > > > 2. Have you tried to check and possibly change what the selenium-webdriver > gem is doing? Consider dumping the command arguments before it shells out > to the firefox bin (assuming this is what it does). If you have access to > the gem locally and want to open it in your editor, you can run: > > ➥ bundle open selenium-webdriver > > > If you need to see where the source is and don't have direct access (e.g. > running through a docker container): > > ➥ bundle show selenium-webdriver > > > 3. My Firefox shows as version 53.0.3; a bit newer than your 47.0.1 . > Assuming the "-foreground" option is being passed to the firefox-bin > binary, I can verify it doesn't appear to be a valid argument. > > ➥ /Applications/Firefox.app/Contents/MacOS/firefox-bin --help >> Usage: /Applications/Firefox.app/Contents/MacOS/firefox-bin [ options >> ... ] [URL] >> where options include: >> --g-fatal-warnings Make all warnings fatal >> Firefox options >> -h or --help Print this message. >> -v or --version Print Firefox version. >> -P <profile> Start with <profile>. >> --profile <path> Start with profile at <path>. >> --migration Start with migration wizard. >> --ProfileManager Start with ProfileManager. >> --no-remote Do not accept or send remote commands; implies >> --new-instance. >> --new-instance Open new instance, not a new window in running >> instance. >> --UILocale <locale> Start with <locale> resources as UI Locale. >> --safe-mode Disables extensions and themes for this session. >> --browser Open a browser window. >> --new-window <url> Open <url> in a new window. >> --new-tab <url> Open <url> in a new tab. >> --private-window <url> Open <url> in a new private window. >> --preferences Open Preferences dialog. >> --search <term> Search <term> with your default search engine. >> --jsconsole Open the Browser Console. >> --jsdebugger Open the Browser Toolbox. >> --devtools Open DevTools on initial load. >> --start-debugger-server [ws:][ <port> | <path> ] Start the debugger >> server on >> a TCP port or Unix domain socket path. Defaults to >> TCP port >> 6000. Use WebSocket protocol if ws: prefix is >> specified. >> --recording <file> Record drawing for a given URL. >> --recording-output <file> Specify destination file for a drawing >> recording. >> --setDefaultBrowser Set this app as the default browser. > > > Hope this helps, > > Alan > > > On Tue, May 30, 2017 at 3:21 AM, Benjamin Wanicur <[email protected]> > wrote: > >> 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::C >> apabilities.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/g >> ems/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. >> > > -- > -- > 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. > -- -- 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.
