protected function DrupalWebTestCase::xpath in SimpleTest 7
Same name and namespace in other branches
- 6.2 drupal_web_test_case.php \DrupalWebTestCase::xpath()
- 7.2 drupal_web_test_case.php \DrupalWebTestCase::xpath()
Perform an xpath search on the contents of the internal browser. The search is relative to the root element (HTML tag normally) of the page.
Parameters
$xpath: The xpath string to use in the search.
Return value
The return value of the xpath search. For details on the xpath string format and return values see the SimpleXML documentation, http://us.php.net/manual/function.simplexml-element-xpath.php.
13 calls to DrupalWebTestCase::xpath()
- DrupalWebTestCase::assertFieldByXPath in ./
drupal_web_test_case.php - Assert that a field exists in the current page by the given XPath.
- DrupalWebTestCase::assertFieldChecked in ./
drupal_web_test_case.php - Assert that a checkbox field in the current page is checked.
- DrupalWebTestCase::assertLink in ./
drupal_web_test_case.php - Pass if a link with the specified label is found, and optional with the specified index.
- DrupalWebTestCase::assertNoFieldByXPath in ./
drupal_web_test_case.php - Assert that a field does not exist in the current page by the given XPath.
- DrupalWebTestCase::assertNoFieldChecked in ./
drupal_web_test_case.php - Assert that a checkbox field in the current page is not checked.
File
- ./
drupal_web_test_case.php, line 1692
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Code
protected function xpath($xpath) {
if ($this
->parse()) {
return $this->elements
->xpath($xpath);
}
return FALSE;
}