Chris@0: response["args"][0]; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Selector of the element to act with the mouse Chris@0: * @return string Chris@0: */ Chris@0: public function getSelector() { Chris@0: return $this->response["args"][1]; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the position where the click was done Chris@0: * @return array Chris@0: */ Chris@0: public function getPosition() { Chris@0: $position = array(); Chris@0: $position[0] = $this->response["args"][1]['x']; Chris@0: $position[1] = $this->response["args"][2]['y']; Chris@0: return $position; Chris@0: } Chris@0: Chris@0: /** Chris@0: * @return string Chris@0: */ Chris@0: public function message() { Chris@0: $name = $this->getName(); Chris@0: $position = implode(",", $this->getPosition()); Chris@0: return "Firing a $name at co-ordinates [$position] failed. Poltergeist detected Chris@0: another element with CSS selector '#{selector}' at this position. Chris@0: It may be overlapping the element you are trying to interact with. Chris@0: If you don't care about overlapping elements, try using node.trigger('$name')."; Chris@0: } Chris@0: }