You are here

public function PhantomJSDriver::getAttribute 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::getAttribute()

Gets the attribute value of a given element and name

Parameters

string $xpath:

string $name:

Return value

string

Throws

DriverException

Overrides CoreDriver::getAttribute

File

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

Class

PhantomJSDriver
Class PhantomJSDriver @package Behat\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

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