public function BambooTwigTestBase::assertElementPresent in Bamboo Twig 8.5
Same name and namespace in other branches
- 8 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()
- 8.2 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()
- 8.3 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()
- 8.4 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()
Asserts that the element with the given CSS selector is present.
Parameters
string $css_selector: The CSS selector identifying the element to check.
Throws
Behat\Mink\Exception\ElementHtmlException When the condition is not fulfilled.
Overrides AssertLegacyTrait::assertElementPresent
See also
\Behat\Mink\WebAssert::elementExists
File
- tests/
src/ Functional/ BambooTwigTestBase.php, line 275
Class
- BambooTwigTestBase
- Has some additional helper methods to make test code more readable.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function assertElementPresent($css_selector) {
$this
->assertSession()
->elementExists('css', $css_selector);
}