You are here

public function MouseTrait::click in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/jcalderonzumba/mink-phantomjs-driver/src/MouseTrait.php \Zumba\Mink\Driver\MouseTrait::click()

Clicks if possible on an element given by xpath

Parameters

string $xpath:

Return value

mixed

Throws

DriverException

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/MouseTrait.php, line 29

Class

MouseTrait
Class MouseTrait @package Zumba\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

public function click($xpath) {
  $elements = $this
    ->findElement($xpath, 1);
  $this->browser
    ->click($elements["page_id"], $elements["ids"][0]);
}