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



131
132
133
# File 'lib/capybara/poltergeist/errors.rb', line 131

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

#nameObject



119
120
121
# File 'lib/capybara/poltergeist/errors.rb', line 119

def name
  response['name']
end

#unsupported_messageObject



123
124
125
# File 'lib/capybara/poltergeist/errors.rb', line 123

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

#versionObject



127
128
129
# File 'lib/capybara/poltergeist/errors.rb', line 127

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