src/DrupalExtension/Context/VisibilityContext.php
public function assertElementVisibility($tag, $text) {
    $element = $this->getSession()->getPage();
    /** @var \Behat\Mink\Element\NodeElement[] $nodes */
    $nodes = $element->findAll('css', $tag);
    foreach ($nodes as $node) {
      if ($node->getText() === $text) {
        $this->assertElementVisible($text, $node);
      }
    }
  }
public function assertElementVisibility($tag, $text) {
    $element = $this->getSession()->getPage();
    /** @var \Behat\Mink\Element\NodeElement[] $nodes */
    $nodes = $element->findAll('css', $tag);
    foreach ($nodes as $node) {
      if ($node->getText() === $text) {
        $this->assertElementVisible($text, $node);
      }
    }
  }
public function assertElementVisibility ( $ tag , $ text ) { $ element = $ this -> getSession ( ) -> getPage ( ) ; /** @var \Behat\Mink\Element\NodeElement[] $nodes */ $ nodes = $ element -> findAll ( 'css' , $ tag ) ; foreach ( $ nodes as $ node ) { if ( $ node -> getText ( ) === $ text ) { $ this -> assertElementVisible ( $ text , $ node ) ; } } }
Assert presence of given element on the page.

@Then the element :tag with text :text should be visible
Assert presence of given element on the page .