Exception: Capybara::Poltergeist::UnsupportedFeature

Inherits:
ClientError
  • Object
show all
Defined in:
lib/capybara/poltergeist/errors.rb

Instance Attribute Summary

Attributes inherited from ClientError

#response

Instance Method Summary collapse

Methods inherited from ClientError

#initialize

Constructor Details

This class inherits a constructor from Capybara::Poltergeist::ClientError

Instance Method Details

#messageObject



133
134
135
# File 'lib/capybara/poltergeist/errors.rb', line 133

def message
  "Running version of PhantomJS #{version} does not support some feature: #{unsupported_message}"
end

#nameObject



121
122
123
# File 'lib/capybara/poltergeist/errors.rb', line 121

def name
  response['name']
end

#unsupported_messageObject



125
126
127
# File 'lib/capybara/poltergeist/errors.rb', line 125

def unsupported_message
  response['args'][0]
end

#versionObject



129
130
131
# File 'lib/capybara/poltergeist/errors.rb', line 129

def version
  response['args'][1].values_at(*%w(major minor patch)).join '.'
end