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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:20:09+00:00 2026-06-13T04:20:09+00:00

I am using Capybara (Selenium driver) for visiting some pages on the site. I

  • 0

I am using Capybara (Selenium driver) for visiting some pages on the site. I just click on every item in the array and click back button. It goes fine but every time after some number of iterations it brokes.
Here is code:

all(:xpath, '//table[@class="griglia_bordata"]//tr[td]/td/a[1]').each do |a|
  a_js_functions << a[:href]
end
a_js_functions.each do |js_for_model|
  puts js_for_model
  page.execute_script js_for_model
  find(:xpath, "//a[text()='Check availability']").click
  puts find(".testo_grande_blu_B").text
  puts "--------------------------------------------"
  find(:xpath, "//a[text()='Back']").click
end

I’ve got output:

javascript:selectModel(‘130254’) Style: RB2132
——————————————– javascript:selectModel(‘309257’) Style: RB2140
——————————————– javascript:selectModel(‘68238’) Style: RB3016
——————————————– javascript:selectModel(‘68248’) Style: RB3025
——————————————– javascript:selectModel(‘68293’) Style: RB3026
——————————————– javascript:selectModel(‘68320’) Style: RB3044
——————————————– javascript:selectModel(‘68460’)
/usr/lib/ruby/1.9.1/net/protocol.rb:146:in rescue in rbuf_fill':
Timeout::Error (Timeout::Error) from
/usr/lib/ruby/1.9.1/net/protocol.rb:140:in
rbuf_fill’ from
/usr/lib/ruby/1.9.1/net/protocol.rb:122:in readuntil' from
/usr/lib/ruby/1.9.1/net/protocol.rb:132:in
readline’ from
/usr/lib/ruby/1.9.1/net/http.rb:2562:in read_status_line' from
/usr/lib/ruby/1.9.1/net/http.rb:2551:in
read_new’ from
/usr/lib/ruby/1.9.1/net/http.rb:1319:in block in transport_request'
from /usr/lib/ruby/1.9.1/net/http.rb:1316:in
catch’ from
/usr/lib/ruby/1.9.1/net/http.rb:1316:in transport_request' from
/usr/lib/ruby/1.9.1/net/http.rb:1293:in
request’ from
/usr/lib/ruby/1.9.1/net/http.rb:1286:in block in request' from
/usr/lib/ruby/1.9.1/net/http.rb:745:in
start’ from
/usr/lib/ruby/1.9.1/net/http.rb:1284:in request' from
/var/lib/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/default.rb:82:in
response_for’ from
/var/lib/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/default.rb:38:in
request' from
/var/lib/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/common.rb:40:in
call’ from
/var/lib/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:598:in
raw_execute' from
/var/lib/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:576:in
execute’ from
/var/lib/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:554:in
find_elements_by' from
/var/lib/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/search_context.rb:62:in
find_elements’ from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/selenium/driver.rb:52:in
find' from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/node/finders.rb:158:in
find_in_base’ from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/node/finders.rb:137:in
block in first' from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/node/finders.rb:136:in
each’ from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/node/finders.rb:136:in
first' from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/node/finders.rb:27:in
block in find’ from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/node/base.rb:46:in
wait_until' from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/node/finders.rb:27:in
find’ from (eval):2:in find' from
/var/lib/gems/1.9.1/gems/capybara-1.1.2/lib/capybara/dsl.rb:161:in
find’ from
/home/biske/workspace/ScrapingGlasses/lib/luxottica.rb:39:in block in
scrape' from
/home/biske/workspace/ScrapingGlasses/lib/luxottica.rb:36:in
each’
from /home/biske/workspace/ScrapingGlasses/lib/luxottica.rb:36:in
scrape' from
/home/biske/workspace/ScrapingGlasses/lib/luxottica.rb:12:in
go’
from /home/biske/workspace/ScrapingGlasses/lib/luxottica.rb:48:in
`’

  • 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-13T04:20:10+00:00Added an answer on June 13, 2026 at 4:20 am

    I’ve seen a similar trace before and 2 potential causes for it:

    1) gems like FakeWeb and WebMock modify ruby’s http. Try removing those gems and any similar ones you may be using to mock/block web requests.

    2) I’ve seen a case in a really loaded down system where this timeout would occur somewhat randomly. Really the issue here wasn’t the test but the system and what was running on it. It’s possible to change the timeout used by the http library and continue testing.

    Updated for Capybara: (from http://selenium.googlecode.com/svn/wiki/RubyBindings.wiki)

    Capybara.register_driver :selenium_extended_http_timeout do |app|
        client = Selenium::WebDriver::Remote::Http::Default.new
        client.timeout = 240
        Capybara::Selenium::Driver.new(app, 
                                   :browser => :firefox, 
                                   :http_client => client, 
                                   :resynchronization_timeout => 60,
                                   :resynchronize => true)                                                                   
    end
    Capybara.javascript_driver = :selenium_extended_http_timeout
    

    There’s a good chance you don’t need the resynchronization stuff.

    In both cases this is related to how selenium does some of its internal communications. The JsonWireProtocol.

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

Sidebar

Related Questions

I have a situation when I'm using (using :selenium driver) multiple browsers with Capybara
If I'm using cucumber/capybara with a selenium web driver to test, do I need
I'm writing some automated tests using Capybara/RSpec, I choose/configure the driver by using this
I've written some tests using Capybara, but I'm not using selenium and neither any
I am using Ruby on Rails 3.2.2, cucumber-rails-1.3.0, rspec-rails-2.8.1 and capybara-1.1.2 with the Selenium
I am using Ruby on Rails 3.2.2, cucumber-rails-1.3.0, rspec-rails-2.8.1 and capybara-1.1.2 with the Selenium
I am using Cucumber with Capybara to build my testing framework for a site.
I've been using Capybara for integration/request testing, but have only just realised I can't
I'm using Capybara selenium in my Rails project (on an Ubuntu 10.04 system) and
We have Capybara working with the selenium driver but when I try to use

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.