SimpleBrowser::clickImage PHP Method

clickImage() public method

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