You are here

public function PhantomJSDriver::focus in Zircon Profile 8.0

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

Focus on an element

Parameters

string $xpath:

Throws

DriverException

Overrides CoreDriver::focus

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/PhantomJSDriver.php, line 129

Class

PhantomJSDriver
Class PhantomJSDriver @package Behat\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

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