You are here

class WebAssert in Drupal 8

Same name in this branch
  1. 8 core/tests/Drupal/Tests/WebAssert.php \Drupal\Tests\WebAssert
  2. 8 core/modules/simpletest/src/WebAssert.php \Drupal\simpletest\WebAssert

Defines a class with methods for asserting presence of elements during tests.

Hierarchy

  • class \Drupal\Tests\WebAssert extends \Behat\Mink\WebAssert

Expanded class hierarchy of WebAssert

Deprecated

in drupal:8.1.1 and is removed from drupal:9.0.0. This was moved to another namespace.

See also

\Drupal\Tests

File

core/modules/simpletest/src/WebAssert.php, line 15

Namespace

Drupal\simpletest
View source
class WebAssert extends BaseWebAssert {

}

Members

Namesort descending Modifiers Type Description Overrides
WebAssert::$baseUrl protected property The absolute URL of the site under test.
WebAssert::assert public function Asserts a condition.
WebAssert::assertEscaped public function Passes if the raw text IS found escaped on the loaded page. 1
WebAssert::assertNoEscaped public function Passes if the raw text IS NOT found escaped on the loaded page. 1
WebAssert::buildXPathQuery public function Builds an XPath query.
WebAssert::buttonExists public function Checks that specific button exists on the current page.
WebAssert::buttonNotExists public function Checks that the specific button does NOT exist on the current page.
WebAssert::cleanUrl protected function Trims scriptname from the URL.
WebAssert::fieldDisabled public function Checks that a given form field element is disabled.
WebAssert::fieldEnabled public function Checks that a given form field element is enabled.
WebAssert::hiddenFieldExists public function Checks that specific hidden field exists.
WebAssert::hiddenFieldNotExists public function Checks that specific hidden field does not exist.
WebAssert::hiddenFieldValueEquals public function Checks that specific hidden field have provided value.
WebAssert::hiddenFieldValueNotEquals public function Checks that specific hidden field doesn't have the provided value.
WebAssert::linkByHrefExists public function Passes if a link containing a given href (part) is found.
WebAssert::linkByHrefNotExists public function Passes if a link containing a given href (part) is not found.
WebAssert::linkExists public function Passes if a link with the specified label is found.
WebAssert::linkExistsExact public function Passes if a link with the exactly specified label is found.
WebAssert::linkNotExists public function Passes if a link with the specified label is not found.
WebAssert::linkNotExistsExact public function Passes if a link with the exactly specified label is not found.
WebAssert::optionExists public function Checks that specific option in a select field exists on the current page.
WebAssert::optionNotExists public function Checks that an option in a select field does NOT exist on the current page.
WebAssert::pageTextContainsOnce public function Checks that current page contains text only once.
WebAssert::responseContains public function Checks that page HTML (response content) contains text.
WebAssert::responseNotContains public function Checks that page HTML (response content) does not contains text.
WebAssert::selectExists public function Checks that specific select field exists on the current page.
WebAssert::titleEquals public function Pass if the page title is the given string.
WebAssert::__construct public function Constructor.