1 backdrop_web_test_case.php protected BackdropWebTestCase::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.

File

core/modules/simpletest/backdrop_web_test_case.php, line 3818

Class

BackdropWebTestCase
Test case for typical Backdrop tests.

Code

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