class WebDriverWebAssert

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/WebDriverWebAssert.php \Drupal\FunctionalJavascriptTests\WebDriverWebAssert
  2. 8.9.x core/tests/Drupal/FunctionalJavascriptTests/WebDriverWebAssert.php \Drupal\FunctionalJavascriptTests\WebDriverWebAssert
  3. 11.x core/tests/Drupal/FunctionalJavascriptTests/WebDriverWebAssert.php \Drupal\FunctionalJavascriptTests\WebDriverWebAssert

Defines a JSWebAssert with no support for status code and header assertions.

Hierarchy

  • class \Drupal\Tests\WebAssert extends \Behat\Mink\WebAssert
    • class \Drupal\FunctionalJavascriptTests\JSWebAssert extends \Drupal\Tests\WebAssert
      • class \Drupal\FunctionalJavascriptTests\WebDriverWebAssert extends \Drupal\FunctionalJavascriptTests\JSWebAssert

Expanded class hierarchy of WebDriverWebAssert

File

core/tests/Drupal/FunctionalJavascriptTests/WebDriverWebAssert.php, line 10

Namespace

Drupal\FunctionalJavascriptTests
View source
class WebDriverWebAssert extends JSWebAssert {
    
    /**
     * The use of statusCodeEquals() is not available.
     *
     * @param int $code
     *   The status code.
     */
    public function statusCodeEquals($code) {
        @trigger_error('WebDriverWebAssert::statusCodeEquals() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::statusCodeEquals($code);
    }
    
    /**
     * The use of statusCodeNotEquals() is not available.
     *
     * @param int $code
     *   The status code.
     */
    public function statusCodeNotEquals($code) {
        @trigger_error('WebDriverWebAssert::statusCodeNotEquals() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::statusCodeNotEquals($code);
    }
    
    /**
     * The use of responseHeaderEquals() is not available.
     *
     * @param string $name
     *   The name of the header.
     * @param string $value
     *   The value to check the header against.
     */
    public function responseHeaderEquals($name, $value) {
        @trigger_error('WebDriverWebAssert::responseHeaderEquals() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::responseHeaderEquals($name, $value);
    }
    
    /**
     * The use of responseHeaderNotEquals() is not available.
     *
     * @param string $name
     *   The name of the header.
     * @param string $value
     *   The value to check the header against.
     */
    public function responseHeaderNotEquals($name, $value) {
        @trigger_error('WebDriverWebAssert::responseHeaderNotEquals() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::responseHeaderNotEquals($name, $value);
    }
    
    /**
     * The use of responseHeaderContains() is not available.
     *
     * @param string $name
     *   The name of the header.
     * @param string $value
     *   The value to check the header against.
     */
    public function responseHeaderContains($name, $value) {
        @trigger_error('WebDriverWebAssert::responseHeaderContains() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::responseHeaderContains($name, $value);
    }
    
    /**
     * The use of responseHeaderNotContains() is not available.
     *
     * @param string $name
     *   The name of the header.
     * @param string $value
     *   The value to check the header against.
     */
    public function responseHeaderNotContains($name, $value) {
        @trigger_error('WebDriverWebAssert::responseHeaderNotContains() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::responseHeaderNotContains($name, $value);
    }
    
    /**
     * The use of responseHeaderMatches() is not available.
     *
     * @param string $name
     *   The name of the header.
     * @param string $regex
     *   The value to check the header against.
     */
    public function responseHeaderMatches($name, $regex) {
        @trigger_error('WebDriverWebAssert::responseHeaderMatches() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::responseHeaderMatches($name, $regex);
    }
    
    /**
     * The use of responseHeaderNotMatches() is not available.
     *
     * @param string $name
     *   The name of the header.
     * @param string $regex
     *   The value to check the header against.
     */
    public function responseHeaderNotMatches($name, $regex) {
        @trigger_error('WebDriverWebAssert::responseHeaderNotMatches() is deprecated in drupal:8.4.0 and is removed in drupal:12.0.0. See https://www.drupal.org/node/2857562', E_USER_DEPRECATED);
        parent::responseHeaderNotMatches($name, $regex);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
JSWebAssert::assertEscaped public function Passes if the raw text IS found escaped on the loaded page. Overrides WebAssert::assertEscaped
JSWebAssert::assertExpectedAjaxRequest public function Asserts that an AJAX request has been completed.
JSWebAssert::assertNoElementAfterWait public function Asserts that no matching element exists on the page after a wait.
JSWebAssert::assertNoEscaped public function Passes if the raw text IS NOT found escaped on the loaded page. Overrides WebAssert::assertNoEscaped
JSWebAssert::assertNotVisibleInViewport public function Tests that a node, or its specific corner, is not visible in the viewport.
JSWebAssert::assertVisibleInViewport public function Tests that a node, or its specific corner, is visible in the viewport.
JSWebAssert::assertWaitOnAjaxRequest public function Waits for AJAX request to be completed.
JSWebAssert::buildJavascriptStatusMessageSelector private function Builds a xpath selector for a message with given type and text.
JSWebAssert::checkNodeVisibilityInViewport private function Check the visibility of a node, or its specific corner.
JSWebAssert::escapeHtml protected function Escapes HTML for testing.
JSWebAssert::isExceptionNotClickable public static function Determines if an exception is due to an element not being clickable.
JSWebAssert::statusMessageContains public function Asserts that a status message containing a given string exists. Overrides WebAssert::statusMessageContains
JSWebAssert::statusMessageContainsAfterWait public function Asserts that a status message containing given string exists after wait.
JSWebAssert::statusMessageExistsAfterWait public function Asserts that a status message exists after wait.
JSWebAssert::statusMessageNotContains public function Asserts that a status message containing a given string does not exist. Overrides WebAssert::statusMessageNotContains
JSWebAssert::statusMessageNotContainsAfterWait public function Asserts that no status message containing given string exists after wait.
JSWebAssert::statusMessageNotExistsAfterWait public function Asserts that a status message does not exist after wait.
JSWebAssert::waitForButton public function Waits for the button specified by the locator and returns it.
JSWebAssert::waitForElement public function Waits for the specified selector and returns it when available.
JSWebAssert::waitForElementRemoved public function Looks for the specified selector and returns TRUE when it is unavailable.
JSWebAssert::waitForElementVisible public function Waits for the specified selector and returns it when available and visible.
JSWebAssert::waitForField public function Waits for a field with specified locator and returns it when available.
JSWebAssert::waitForHelper private function Wraps waits in a function to catch curl exceptions to continue waiting.
JSWebAssert::waitForId public function Waits for an element by its id and returns it when available.
JSWebAssert::waitForLink public function Waits for a link with specified locator and returns it when available.
JSWebAssert::waitForText public function Waits for the specified text and returns TRUE when it is available.
JSWebAssert::waitOnAutocomplete public function Waits for the jQuery autocomplete delay duration.
WebAssert::$baseUrl protected property The absolute URL of the site under test.
WebAssert::addressEquals public function Checks that current session address is equals to provided one.
WebAssert::addressNotEquals public function Checks that current session address is not equals to provided one.
WebAssert::assert public function Asserts a condition.
WebAssert::buildStatusMessageSelector protected function Builds a xpath selector for a message with given type and text.
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 the base URL from the URL.
WebAssert::elementTextEquals public function Asserts a specific element's text equals an expected text.
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::fieldValueEquals public function
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::linkByHrefExistsExact public function Passes if a link with a given href is found.
WebAssert::linkByHrefNotExists public function Passes if a link containing a given href (part) is not found.
WebAssert::linkByHrefNotExistsExact public function Passes if a link with a given href 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::pageContainsNoDuplicateId public function Asserts that each HTML ID is used for just a single element on the page.
WebAssert::pageTextContains public function
WebAssert::pageTextContainsOnce public function Checks that current page contains text only once.
WebAssert::pageTextMatchesCount public function Asserts that the current page text matches regex a number of times.
WebAssert::responseContains public function Checks that page HTML (response content) contains text.
WebAssert::responseHeaderDoesNotExist public function Asserts that the current response header does not have a specific entry.
WebAssert::responseHeaderExists public function Asserts that the current response header has a specific entry.
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::statusMessageExists public function Asserts that a status message exists.
WebAssert::statusMessageNotExists public function Asserts that a status message does not exist.
WebAssert::titleEquals public function Pass if the page title is the given string.
WebAssert::__construct public function Constructor.
WebDriverWebAssert::responseHeaderContains public function The use of responseHeaderContains() is not available.
WebDriverWebAssert::responseHeaderEquals public function The use of responseHeaderEquals() is not available. Overrides WebAssert::responseHeaderEquals
WebDriverWebAssert::responseHeaderMatches public function The use of responseHeaderMatches() is not available.
WebDriverWebAssert::responseHeaderNotContains public function The use of responseHeaderNotContains() is not available.
WebDriverWebAssert::responseHeaderNotEquals public function The use of responseHeaderNotEquals() is not available.
WebDriverWebAssert::responseHeaderNotMatches public function The use of responseHeaderNotMatches() is not available.
WebDriverWebAssert::statusCodeEquals public function The use of statusCodeEquals() is not available.
WebDriverWebAssert::statusCodeNotEquals public function The use of statusCodeNotEquals() is not available.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.