function WebDriverTestBase::assertSession

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::assertSession()
  2. 8.9.x core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::assertSession()
  3. 11.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\Tests\WebAssert A new web-assert option for asserting the presence of elements with.

Overrides UiHelperTrait::assertSession

52 calls to WebDriverTestBase::assertSession()
AjaxMaintenanceModeTest::testAjaxCallMaintenanceMode in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php
Tests maintenance message only appears once on an AJAX call.
AnnounceBlockTest::testAnnounceWithoutPermission in core/modules/announcements_feed/tests/src/FunctionalJavascript/AnnounceBlockTest.php
Testing announce feed block visibility.
BlockDragTest::testDragAndDropBlocks in core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php
Tests drag and drop blocks.
BrowserWithJavascriptTest::testEscapingAssertions in core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
Tests assertEscaped() and assertUnescaped().
CKEditor5MarkupTest::testAttributeEncoding in core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php
Ensures that attribute values are encoded.

... See full list

File

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

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.