Unable to evaluate Capybara(selenium) methods in the debug mode

Hello, I am stuck with this strange problem.
When I was on Windows 7(RubyMine 6.0.3, ruby 1.9.3) I could evaluate capybara(or selenium) methods during debug.
But When I switch to MacOS 10,9(RubyMine 6.0.3, ruby 2.1.1) I couldn't. When I try to evaluate somethinf like page.find('foo').click I received Timeout: evaluation took longer than 10 seconds.
I use the same tests for Windows and MacOS.

In Windows I use ruby-debug-ide + ruby-debug-base19 gems(both of them has latest version)

In MacOS I use ruby-debug-ide + debase(both of them has latest version)

I don't include debugger gem in my GemFile.


Here is backtrace
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:95:in `join'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:95:in `ensure in block in timeout'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:95:in `block in timeout'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:101:in `call'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:101:in `timeout'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:878:in `connect'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:863:in `do_start'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:852:in `start'"
"/Users/igor_poltorak/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1369:in `request'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/default.rb:83:in `response_for'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/default.rb:39:in `request'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:634:in `raw_execute'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:612:in `execute'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:590:in `find_elements_by'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/search_context.rb:62:in `find_elements'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/selenium/driver.rb:69:in `find_xpath'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/node/base.rb:107:in `find_xpath'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/query.rb:110:in `block in resolve_for'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/node/base.rb:80:in `synchronize'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/query.rb:106:in `resolve_for'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/node/finders.rb:35:in `block in find'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/node/base.rb:84:in `synchronize'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/node/finders.rb:30:in `find'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/session.rb:675:in `block (2 levels) in <class:Session>'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/capybara-2.4.1/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/site_prism-2.6/lib/site_prism/page.rb:56:in `find_first'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/site_prism-2.6/lib/site_prism/element_container.rb:6:in `block (2 levels) in element'"
"/Users/igor_poltorak/Automation/features/step_definitions/GH_buy_products.rb:6:in `block in <top (required)>'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/command.rb:122:in `eval'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/command.rb:122:in `block in debug_eval'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/command.rb:109:in `timeout'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/command.rb:121:in `debug_eval'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/commands/inspect.rb:19:in `execute'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/ide_processor.rb:41:in `block (2 levels) in process_commands'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/ide_processor.rb:34:in `each'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/ide_processor.rb:34:in `block in process_commands'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/ide_processor.rb:33:in `catch'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/ide_processor.rb:33:in `process_commands'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/event_processor.rb:58:in `line_event'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/event_processor.rb:34:in `at_line'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/debase-0.0.9/lib/debase/context.rb:37:in `at_line'"
"/Users/igor_poltorak/Automation/features/step_definitions/GH_buy_products.rb:6:in `block in <top (required)>'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/core_ext/instance_exec.rb:48:in `block in cucumber_instance_exec'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/core_ext/instance_exec.rb:69:in `cucumber_run_with_backtrace_filtering'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/core_ext/instance_exec.rb:36:in `cucumber_instance_exec'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/rb_support/rb_step_definition.rb:97:in `invoke'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/step_match.rb:25:in `invoke'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/step_invocation.rb:60:in `invoke'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/step_invocation.rb:38:in `accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:106:in `block in visit_step'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:105:in `visit_step'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/step_collection.rb:19:in `block in accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/step_collection.rb:18:in `each'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/step_collection.rb:18:in `accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:100:in `block in visit_steps'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:99:in `visit_steps'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:15:in `block in execute'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:83:in `block (2 levels) in with_hooks'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:99:in `before_and_after'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:82:in `block in with_hooks'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:120:in `call'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:120:in `block (3 levels) in around'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/language_support/language_methods.rb:9:in `block in around'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/language_support/language_methods.rb:97:in `call'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/language_support/language_methods.rb:97:in `execute_around'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/language_support/language_methods.rb:8:in `around'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:119:in `block (2 levels) in around'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:123:in `call'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:123:in `around'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:94:in `around'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:81:in `with_hooks'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:13:in `execute'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/scenario.rb:32:in `block in accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/scenario.rb:79:in `with_visitor'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/scenario.rb:31:in `accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:58:in `block in visit_feature_element'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:57:in `visit_feature_element'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/feature.rb:38:in `block in accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/feature.rb:37:in `each'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/feature.rb:37:in `accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:27:in `block in visit_feature'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:26:in `visit_feature'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/features.rb:28:in `block in accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/features.rb:17:in `each'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/features.rb:17:in `each'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/features.rb:27:in `accept'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:21:in `block in visit_features'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/ast/tree_walker.rb:20:in `visit_features'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:49:in `run!'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/lib/cucumber/cli/main.rb:47:in `execute!'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.16/bin/cucumber:13:in `<top (required)>'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/bin/cucumber:23:in `load'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1/bin/cucumber:23:in `<top (required)>'"
"/Users/igor_poltorak/.rvm/gems/ruby-2.1.1@global/gems/ruby-debug-ide-0.4.22/bin/rdebug-ide:110:in `<top (required)>'"
Do you have any sugestion?
Thank you so much

2 comments
Comment actions Permalink

Hi,

it looks like a bug for me.  Could you please create a simple test project which demonstrates the problem
so we could reproduce it and try to fix.

Oleg.

0
Comment actions Permalink

The problem was in custom timeout which I specify for selenium_driver

Capybara.register_driver :selenium do |app|
profile = Selenium::WebDriver::Firefox::Profile.new
profile['focusmanager.testmode'] = true
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120
Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile)
end

After I set client.timeout to 60 - the problem was disappeared.

0

Please sign in to leave a comment.