Exception: Capybara::Apparition::MouseEventFailed

Inherits:
NodeError show all
Defined in:
lib/capybara/apparition/errors.rb

Direct Known Subclasses

MouseEventImpossible

Instance Attribute Summary

Attributes inherited from NodeError

#node

Attributes inherited from ClientError

#response

Instance Method Summary collapse

Methods inherited from NodeError

#initialize

Methods inherited from ClientError

#initialize

Constructor Details

This class inherits a constructor from Capybara::Apparition::NodeError

Instance Method Details

#messageObject



170
171
172
173
174
# File 'lib/capybara/apparition/errors.rb', line 170

def message
  "Firing a #{name} at co-ordinates [#{position.join(', ')}] failed. Apparition detected " \
    "another element with CSS selector '#{selector}' at this position. " \
    'It may be overlapping the element you are trying to interact with. '
end

#nameObject



158
159
160
# File 'lib/capybara/apparition/errors.rb', line 158

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

#positionObject



166
167
168
# File 'lib/capybara/apparition/errors.rb', line 166

def position
  [response['args'][2][:x], response['args'][2][:y]]
end

#selectorObject



162
163
164
# File 'lib/capybara/apparition/errors.rb', line 162

def selector
  response['args'][1]
end