You are here

protected function WebformBrowserTestTrait::assertElementVisible in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Traits/WebformBrowserTestTrait.php \Drupal\Tests\webform\Traits\WebformBrowserTestTrait::assertElementVisible()

Asserts that the element with the given CSS selector is visible.

Parameters

string $css_selector: The CSS selector identifying the element to check.

string $message: Optional message to show alongside the assertion.

7 calls to WebformBrowserTestTrait::assertElementVisible()
WebformCardsAutoForwardJavaScriptTest::testAutoForward in modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsAutoForwardJavaScriptTest.php
Test webform cards auto-forward.
WebformCardsDraftJavaScriptTest::testDraft in modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsDraftJavaScriptTest.php
Test webform cards draft.
WebformCardsProgressJavaScriptTest::testProgress in modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsProgressJavaScriptTest.php
Test webform cards progress.
WebformCardsStatesJavaScriptTest::testStates in modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsStatesJavaScriptTest.php
Test webform cards states.
WebformCardsToggleJavaScriptTest::testToggle in modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsToggleJavaScriptTest.php
Test webform cards toggle show/hide all.

... See full list

File

tests/src/Traits/WebformBrowserTestTrait.php, line 462

Class

WebformBrowserTestTrait
Provides convenience methods for webform assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

protected function assertElementVisible($css_selector, $message = '') {
  $this
    ->assertTrue($this
    ->getSession()
    ->getDriver()
    ->isVisible($this
    ->cssSelectToXpath($css_selector)), $message);
}