Exception: Undead::MouseEventFailed

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

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 Undead::NodeError

Instance Method Details

#messageObject



130
131
132
133
134
135
# File 'lib/undead/errors.rb', line 130

def message
  "Firing a #{name} at co-ordinates [#{position.join(', ')}] failed. Poltergeist detected " \
    "another element with CSS selector '#{selector}' at this position. " \
    "It may be overlapping the element you are trying to interact with. " \
    "If you don't care about overlapping elements, try using node.trigger('#{name}')."
end

#nameObject



118
119
120
# File 'lib/undead/errors.rb', line 118

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

#positionObject



126
127
128
# File 'lib/undead/errors.rb', line 126

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

#selectorObject



122
123
124
# File 'lib/undead/errors.rb', line 122

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