Helper function: construct an XPath for the given set of attributes and value.
$attribute: Field attributes.
$value: Value of field.
XPath for specified values.
protected function constructFieldXpath($attribute, $value) {
$xpath = '//textarea[@' . $attribute . '=:value]|//input[@' . $attribute . '=:value]|//select[@' . $attribute . '=:value]';
return $this
->buildXPathQuery($xpath, array(
':value' => $value,
));
}