You are here

public function FormManipulationTrait::getValue in Zircon Profile 8.0

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

Returns the value of a given xpath element

Parameters

string $xpath:

Return value

string

Throws

DriverException

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/FormManipulationTrait.php, line 20

Class

FormManipulationTrait
Trait FormManipulationTrait @package Zumba\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

public function getValue($xpath) {
  $this
    ->findElement($xpath, 1);
  $javascript = $this
    ->javascriptTemplateRender("get_value.js.twig", array(
    "xpath" => $xpath,
  ));
  return $this->browser
    ->evaluate($javascript);
}