Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8479171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:57:00+00:00 2026-06-10T18:57:00+00:00

Several variations of this question have been asked, and I’ve definitely learned from reading

  • 0

Several variations of this question have been asked, and I’ve definitely learned from reading up on the topic, but most of the answers didn’t seem to be directly applicable to this situation, or involved solutions using Rspec or Cucumber.

I’m currently working on a test suite using Minitest and Capybara. I don’t want to have to bring in too many other gems if possible, but I’m open to it if they’re lightweight, because tests are already taking a while to run.

Rspec has :js => true and Cucumber has @javascript, but minitest doesn’t seem to have anything like this. The natural solution, then, would be to switch drivers and do: Capybara.current_driver = :selenium, but when I do this, it doesn’t work, and I get 2 errors (one for each of my js-enabled tests).

My question is this: Why am I getting these errors, and how can I make some basic JavaScript testing work? Here’s are the errors:

Component returned failure code: 0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL) [nsIWebNavigation.loadURI]
    Exception `Selenium::WebDriver::Error::UnknownError' at:
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/default.rb:65:in `request'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:576:in `execute'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:99:in `get'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/navigation.rb:14:in `to'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/selenium/driver.rb:36:in `visit'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/session.rb:157:in `visit'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/dsl.rb:161:in `visit'
    test/integration/resource_access_test.rb:22:in `block (2 levels) in <top (required)>'

And here’s the other error:

undefined method `[]' for nil:NilClass
    Exception `NoMethodError' at:
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/rack-test-0.6.1/lib/rack/test.rb:171:in `env_for'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/rack-test-0.6.1/lib/rack/test.rb:56:in `get'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/rack_test/browser.rb:62:in `process'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/rack_test/browser.rb:21:in `visit'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/rack_test/driver.rb:32:in `visit'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/session.rb:157:in `visit'
    /Users/epithelialbiology/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara/dsl.rb:161:in `visit'
    test/integration/resource_access_test.rb:40:in `block (2 levels) in <top (required)>'

Does anyone know what could be going on here, as well as how I can fix this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:57:02+00:00Added an answer on June 10, 2026 at 6:57 pm

    Try the following syntax to switch Capybara drivers:

    Capybara.current_driver = Capybara.javascript_driver
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked in several variations before, but my question
I have seen several variations of this question asked however none of witch fully
I realize this question has been asked many times and I am have looked
First, I know this question has been asked several times before and that in
This is a variation on a question that has been asked here several times.
I have found lot's of variations for this question but just wanted some clarity
I have seen several variations of this awk code (people have re-written it to
I'm attempting to implement this paper . I've have most of it down, but
I've already asked similar question on this issue on stack overflow already, but I
In WPF most controls have MouseUp and MouseDown events (and the mouse-button-specific variations) but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.