class MouseEventFailed in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/jcalderonzumba/gastonjs/src/Exception/MouseEventFailed.php \Zumba\GastonJS\Exception\MouseEventFailed
Class MouseEventFailed @package Zumba\GastonJS\Exception
Hierarchy
- class \Zumba\GastonJS\Exception\ClientError extends \Zumba\GastonJS\Exception\Exception
- class \Zumba\GastonJS\Exception\NodeError
- class \Zumba\GastonJS\Exception\MouseEventFailed
- class \Zumba\GastonJS\Exception\NodeError
Expanded class hierarchy of MouseEventFailed
File
- vendor/
jcalderonzumba/ gastonjs/ src/ Exception/ MouseEventFailed.php, line 9
Namespace
Zumba\GastonJS\ExceptionView source
class MouseEventFailed extends NodeError {
/**
* Gets the name of the event
* @return string
*/
public function getName() {
return $this->response["args"][0];
}
/**
* Selector of the element to act with the mouse
* @return string
*/
public function getSelector() {
return $this->response["args"][1];
}
/**
* Returns the position where the click was done
* @return array
*/
public function getPosition() {
$position = array();
$position[0] = $this->response["args"][1]['x'];
$position[1] = $this->response["args"][2]['y'];
return $position;
}
/**
* @return string
*/
public function message() {
$name = $this
->getName();
$position = implode(",", $this
->getPosition());
return "Firing a {$name} at co-ordinates [{$position}] failed. Poltergeist detected\n another element with CSS selector '#{selector}' at this position.\n It may be overlapping the element you are trying to interact with.\n If you don't care about overlapping elements, try using node.trigger('{$name}').";
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ClientError:: |
protected | property | @var mixed | |
ClientError:: |
public | function | ||
ClientError:: |
public | function | ||
MouseEventFailed:: |
public | function | Gets the name of the event | |
MouseEventFailed:: |
public | function | Returns the position where the click was done | |
MouseEventFailed:: |
public | function | Selector of the element to act with the mouse | |
MouseEventFailed:: |
public | function | ||
NodeError:: |
protected | property | ||
NodeError:: |
public | function |
Overrides ClientError:: |