ibaralf
ibaralf

Reputation: 12528

Getting error undefined method Capybara.wait_on_first_by_default

Updated to latest site_prism gem and now I'm getting this Capybara error

Failure/Error: Capybara.wait_on_first_by_default = true

NoMethodError:
undefined method `wait_on_first_by_default=' for Capybara:Module
# ./specs/spec_helper.rb:27:in `<module:CapybaraHelper>'
# ./specs/spec_helper.rb:20:in `<top (required)>'
# ./specs/lendinghome_spec.rb:1:in `require_relative'

bundle install shows version:

Using capybara 3.5.1
Using chromedriver-helper 1.2.0
Using site_prism 2.17.1

NOTE: I tried just removing this line, but the effect was Capybara was not waiting for the elements and kept not finding the next elements. Basically my previous tests which has been very stable were now failing in lots of areas or retrying.

Upvotes: 0

Views: 643

Answers (1)

Thomas Walpole
Thomas Walpole

Reputation: 49950

That setting was removed in Capybara 3 - and is now the normal behavior for first. If you were setting it to true you can just remove the offending line.

Upvotes: 3

Related Questions