function WebDriverTestBase::assertSession

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::assertSession()
  2. 10 core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::assertSession()
  3. 9 core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::assertSession()
  4. 8.9.x core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::assertSession()

Returns WebAssert object.

Parameters

string $name: (optional) Name of the session. Defaults to the active session.

Return value

\Drupal\FunctionalJavascriptTests\WebDriverWebAssert A new web-assert option for asserting the presence of elements with.

129 calls to WebDriverTestBase::assertSession()
AjaxBlockTest::testAddAjaxBlock in core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
Tests configuring a field block for a user field.
BlockFilterTest::assertAnnounceContains in core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php
Checks for inclusion of text in #drupal-live-announce.
BlockFilterTest::testBlockFilter in core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php
Tests block filter.
BlockFormMessagesTest::assertMessagesDisplayed in core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
Asserts that the validation messages are shown correctly.
BlockFormMessagesTest::testValidationMessage in core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
Tests that validation messages are shown on the block form.

... See full list

File

core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php, line 195

Class

WebDriverTestBase
Runs a browser test using a driver that supports JavaScript.

Namespace

Drupal\FunctionalJavascriptTests

Code

public function assertSession($name = NULL) {
  return new WebDriverWebAssert($this->getSession($name), $this->baseUrl);
}

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