You are here

public function WebDriverTestBase::assertSession in Drupal 8

Same name and namespace in other branches
  1. 9 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

209 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.
AjaxFormImageButtonTest::testAjaxImageButtonKeypressEnter in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
Tests image buttons can be operated with the keyboard ENTER key.
AjaxFormImageButtonTest::testAjaxImageButtonKeypressSpace in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
Tests image buttons can be operated with the keyboard SPACE key.
AjaxInGroupTest::testSimpleAjaxFormValue in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php
Submits forms with select and checkbox elements via Ajax.
AjaxTest::testAjaxWithAdminRoute in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php

... See full list

1 method overrides WebDriverTestBase::assertSession()
JavascriptTestBase::assertSession in core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php
Returns WebAssert object.

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);
}