0
votes

It's seems like gem sauce-3.5.11 uses a deprecated 'within_frame' method.I have also tried to change to older version but I get the same error

undefined method `within_frame' for class `Sauce::Capybara::Driver' (NameError)
/Users/user/.rvm/gems/ruby-2.2.4/gems/sauce-3.5.11/lib/sauce/capybara.rb:41:in `'
/Users/user/.rvm/gems/ruby-2.2.4/gems/sauce-3.5.11/lib/sauce/capybara.rb:12:in `'
/Users/user/.rvm/gems/ruby-2.2.4/gems/sauce-3.5.11/lib/sauce/capybara.rb:11:in `'
/Users/user/.rvm/gems/ruby-2.2.4/gems/sauce-3.5.11/lib/sauce/capybara.rb:10:in `'
RubyGems Environment:
  - RUBYGEMS VERSION: 2.4.8
  - RUBY VERSION: 2.2.4 (2015-12-16 patchlevel 230) [x86_64-darwin14.5.0]
  - INSTALLATION DIRECTORY: /Users/user/.rvm/gems/ruby-2.2.4
  - RUBY EXECUTABLE: /Users/user/.rvm/rubies/ruby-2.2.4/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/user/.rvm/gems/ruby-2.2.4/bin
  - SPEC CACHE DIRECTORY: /Users/user/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/user/.rvm/rubies/ruby-2.2.4/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-14
  - GEM PATHS:
     - /Users/user/.rvm/gems/ruby-2.2.4
     - /Users/user/.rvm/gems/ruby-2.2.4@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/user/.rvm/gems/ruby-2.2.4/bin
     - /Users/user/.rvm/gems/ruby-2.2.4@global/bin
     - /Users/user/.rvm/rubies/ruby-2.2.4/bin
     - /Users/user/.rvm/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin
1

1 Answers

1
votes

The sauce gem has not been upgraded to support the frames API change that occurred in the selenium driver (which the sauce driver derives from) in Capybara 2.8, and since the entire sauce gem is deprecated I would guess it's not going to be. You can either lock to capybara 2.7.1 or look further back in your stacktrace, figure out why the code is calling within_frame directly on the driver, and instead try calling it on the session like it should be.

page.driver.within_frame(...)   # wrong
page.within_frame(...)  # correct