Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Browser#initialize causes infinite loop #24

Open
jbielick opened this issue May 13, 2016 · 0 comments
Open

Browser#initialize causes infinite loop #24

jbielick opened this issue May 13, 2016 · 0 comments

Comments

@jbielick
Copy link

jbielick commented May 13, 2016

Gemfile

...
group :test do
  gem 'rspec-rails'
  gem 'rspec-activemodel-mocks'
  gem 'rspec-collection_matchers'
  gem 'rspec_junit_formatter', '0.2.2'
  gem 'ruby-prof'
  gem 'rdoc'
  gem 'simplecov', '>= 0.4.0', require: false
  gem 'test_after_commit'

  gem 'cucumber-rails', require: false
  gem 'page-object'
  gem 'faker'
  gem 'factory_girl'
  gem 'database_cleaner'
  gem 'watir-rails'
  gem 'watir-scroll'
end
require 'watir/rails'

browser = Watir::Browser.new(:chrome)

Causes:

.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:10:in `initialize'
.../2.2.0/gems/watir-5.0.0/lib/watir/loader.rb:9:in `initialize'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:53:in `block in initialize_rails_with_watir'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:36:in `call'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:36:in `override_and_preserve_original_methods'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:53:in `initialize_rails_with_watir'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:10:in `initialize'
.../2.2.0/gems/watir-5.0.0/lib/watir/loader.rb:9:in `initialize'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:53:in `block in initialize_rails_with_watir'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:36:in `call'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:36:in `override_and_preserve_original_methods'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:53:in `initialize_rails_with_watir'
.../2.2.0/gems/watir-rails-1.2.0/lib/watir/browser.rb:10:in `initialize'

watir-rails aliases initialize but this module has no idea (apparently). Both seem to be caught in an infinite loop of aliased initialize.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant