DrupalWebTestCase::constructFieldXpath

  1. drupal
    1. 8
    2. 7
Versions
7 protected DrupalWebTestCase::constructFieldXpath($attribute, $value)

Helper function: construct an XPath for the given set of attributes and value.

Parameters

$attribute Field attributes.

$value Value of field.

Return value

XPath for specified values.

Code

modules/simpletest/drupal_web_test_case.php, line 3258

<?php
protected function constructFieldXpath($attribute, $value) {
  $xpath = '//textarea[@' . $attribute . '=:value]|//input[@' . $attribute . '=:value]|//select[@' . $attribute . '=:value]';
  return $this->buildXPathQuery($xpath, array(':value' => $value));
}
?>