Exception: Isomorfeus::Puppetmaster::MouseEventFailed
- Inherits:
-
ClientError
- Object
- StandardError
- Error
- ClientError
- Isomorfeus::Puppetmaster::MouseEventFailed
- Defined in:
- lib/isomorfeus/puppetmaster/errors.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Attributes inherited from ClientError
Instance Method Summary collapse
-
#initialize ⇒ MouseEventFailed
constructor
A new instance of MouseEventFailed.
- #message ⇒ Object
Constructor Details
#initialize ⇒ MouseEventFailed
Returns a new instance of MouseEventFailed.
55 56 57 58 59 60 |
# File 'lib/isomorfeus/puppetmaster/errors.rb', line 55 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 |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
53 54 55 |
# File 'lib/isomorfeus/puppetmaster/errors.rb', line 53 def name @name end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
53 54 55 |
# File 'lib/isomorfeus/puppetmaster/errors.rb', line 53 def position @position end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
53 54 55 |
# File 'lib/isomorfeus/puppetmaster/errors.rb', line 53 def selector @selector end |
Instance Method Details
#message ⇒ Object
63 64 65 66 67 68 |
# File 'lib/isomorfeus/puppetmaster/errors.rb', line 63 def "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 |