protected function DrupalWebTestCase::constructFieldXpath in SimpleTest 7
Same name and namespace in other branches
- 6.2 drupal_web_test_case.php \DrupalWebTestCase::constructFieldXpath()
- 7.2 drupal_web_test_case.php \DrupalWebTestCase::constructFieldXpath()
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.
6 calls to DrupalWebTestCase::constructFieldXpath()
- DrupalWebTestCase::assertField in ./
drupal_web_test_case.php - Assert that a field exists with the given name or id.
- DrupalWebTestCase::assertFieldById in ./
drupal_web_test_case.php - Assert that a field exists in the current page with the given id and value.
- DrupalWebTestCase::assertFieldByName in ./
drupal_web_test_case.php - Assert that a field exists in the current page with the given name and value.
- DrupalWebTestCase::assertNoField in ./
drupal_web_test_case.php - Assert that a field does not exist with the given name or id.
- DrupalWebTestCase::assertNoFieldById in ./
drupal_web_test_case.php - Assert that a field does not exist with the given id and value.
File
- ./
drupal_web_test_case.php, line 2460
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Code
protected function constructFieldXpath($attribute, $value) {
return '//textarea[@' . $attribute . '="' . $value . '"]|//input[@' . $attribute . '="' . $value . '"]|//select[@' . $attribute . '="' . $value . '"]';
}