SimpleBrowser::clickImageById PHP Method

clickImageById() public method

The owning form will be submitted by this. Clicking outside of the boundary of the coordinates will result in a failure.
public clickImageById ( integer/string $id, integer $x = 1, integer $y = 1, hash $additional = false ) : string/boolean
$id integer/string
$x integer X-coordinate of imaginary click.
$y integer Y-coordinate of imaginary click.
$additional hash Additional form data.
return string/boolean
    public function clickImageById($id, $x = 1, $y = 1, $additional = false)
    {
        if (!($form = $this->page->getFormByImage(new SelectById($id)))) {
            return false;
        }
        $success = $this->load($form->getAction(), $form->submitImage(new SelectById($id), $x, $y, $additional));
        return $success ? $this->getContent() : $success;
    }