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 8283045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:35:43+00:00 2026-06-08T10:35:43+00:00

I have a strange problem with acceptance tests, capybara showing me only first scenario

  • 0

I have a strange problem with acceptance tests, capybara showing me only first scenario in a browser, all other are just run in back-end and i see a blank page for some reason(but they pass and failed normally). My config is:

require 'capybara'

Capybara.register_driver :selenium_chrome do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end

Capybara.current_driver = :selenium_chrome
Capybara.javascript_driver = :selenium_chrome
Capybara.run_server = true
Capybara.server_port = 7000
Capybara.app_host = "http://localhost:#{Capybara.server_port}"

tests:

feature 'f1' do

  background do
    @user = create(:user)
    visit "/"
    fill_in 'Email', :with => @user.email
    fill_in 'Password', :with => 'password'
    click_button 'Sign In'
  end

  scenario "sc1" do
    click_link '1'
    click_link '2'
    click_link '3'
    page.should have_content('120')
  end

  scenario "sc2" do
    click_link '4'
    click_link '5'
    click_link '6'
    page.should have_content('110')
  end

end

gemfile:

group :test do
  gem 'rspec', '~> 2.8.0'
  gem 'rspec-rails', '~> 2.8.0'

  gem 'shoulda', '~> 2.11.3'
  gem 'shoulda-matchers'

  gem 'capybara', '~> 1.1.2'
  gem 'nokogiri', '~> 1.5.2'
  gem 'database_cleaner'
end

So I can see only sc1 running in browser, sc2 and all others are just run in background and i see a blank page in chrome. Any suggestions?

  • 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-08T10:35:44+00:00Added an answer on June 8, 2026 at 10:35 am

    If someone will meet same problem:

    RSpec.configure do |config|
      config.before do
        Capybara.current_driver = :selenium_chrome
        Capybara.javascript_driver = :selenium_chrome
        Capybara.run_server = true
        Capybara.server_port = 7000
        Capybara.app_host = "http://localhost:#{Capybara.server_port}"
      end
    end
    

    placing this in before block does the trick

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem when using Entity Framework code first. When I return
I have strange problem on my pc/server. I run query such as Select field1,
I have strange problem with run .exe program in my WebApplication. It works fine
Good day! I have strange problem with Xcode 4.3. When I'm trying to run
I have a strange problem. When I run app and click button (btn_eng or
i have strange problem doing reporting: i have numerous clients with different issued invoices.
I have strange problem with receiving data from socket. On client im using air
I have a strange problem on ipv6 connection. I write down a simple client
I have a strange problem with IE. I have a sequence of forms on
I have a strange problem with in-app billing RESTORE_TRANSACTION command. Every request RESTORE_TRANSACTION request

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.