function AssertContentTrait::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
\SimpleXMLElement[] The return value of the XPath search performed after converting the CSS selector to an XPath selector.
14 calls to AssertContentTrait::cssSelect()
- ClaroVerticalTabsTest::testVerticalTabs in core/tests/ Drupal/ KernelTests/ Core/ Theme/ ClaroVerticalTabsTest.php 
- Confirms that Claro can render vertical tabs correctly.
- CommentAdminViewTest::doTestFilters in core/modules/ comment/ tests/ src/ Kernel/ Views/ CommentAdminViewTest.php 
- Tests comment admin view display.
- LayoutBuilderCompatibilityTestBase::assertFieldAttributes in core/modules/ layout_builder/ tests/ src/ Kernel/ LayoutBuilderCompatibilityTestBase.php 
- Asserts that the rendered entity has the correct fields.
- LayoutBuilderFieldLayoutCompatibilityTest::testCompatibility in core/modules/ layout_builder/ tests/ src/ Kernel/ LayoutBuilderFieldLayoutCompatibilityTest.php 
- Tests the compatibility of Layout Builder and Field Layout.
- LayoutBuilderInstallTest::testCompatibility in core/modules/ layout_builder/ tests/ src/ Kernel/ LayoutBuilderInstallTest.php 
- Tests the compatibility of Layout Builder with existing entity displays.
File
- 
              core/tests/ Drupal/ KernelTests/ AssertContentTrait.php, line 245 
Class
- AssertContentTrait
- Provides test methods to assert content.
Namespace
Drupal\KernelTestsCode
protected function cssSelect($selector) {
  return $this->xpath((new CssSelectorConverter())->toXPath($selector));
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
