function UiHelperTrait::cssSelect

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::cssSelect()
  2. 10 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::cssSelect()
  3. 8.9.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::cssSelect()

Searches elements using a CSS selector in the raw content.

The search is relative to the root element (HTML tag normally) of the page.

Parameters

string $selector: CSS selector to use in the search.

Return value

\Behat\Mink\Element\NodeElement[] The list of elements on the page that match the selector.

6 calls to UiHelperTrait::cssSelect()
ConfigTranslationOverviewTest::testMapperListPage in core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
Tests the config translation mapper page.
FileFieldWidgetTest::testSingleValuedWidget in core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php
Tests uploading and remove buttons for a single-valued File field.
LocaleContentTest::testContentTypeDirLang in core/modules/locale/tests/src/Functional/LocaleContentTest.php
Tests if a dir and lang tags exist in node's attributes.
NestedFormTest::testNestedEntityFormEntityLevelValidation in core/modules/field/tests/src/Functional/NestedFormTest.php
Tests entity level validation within subforms.
RearrangeFieldsTest::testRearrangeFields in core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php
Tests field sorting.

... See full list

File

core/tests/Drupal/Tests/UiHelperTrait.php, line 557

Class

UiHelperTrait
Provides UI helper methods.

Namespace

Drupal\Tests

Code

protected function cssSelect($selector) {
  return $this->getSession()
    ->getPage()
    ->findAll('css', $selector);
}

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