class Capybara::Cuprite::MouseEventFailed

Attributes

name[R]
position[R]
selector[R]

Public Class Methods

new(*) click to toggle source
Calls superclass method Capybara::Cuprite::ClientError::new
# File lib/capybara/cuprite/errors.rb, line 29
def initialize(*)
  super
  data = /\A\w+: (\w+), (.+?), ([\d\.-]+), ([\d\.-]+)/.match(@response)
  @name, @selector = data.values_at(1, 2)
  @position = data.values_at(3, 4).map(&:to_f)
end

Public Instance Methods

message() click to toggle source
# File lib/capybara/cuprite/errors.rb, line 37
def message
  "Firing a #{name} at coordinates [#{position.join(", ")}] failed. Cuprite 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