public function theElementShouldBeVisible($element)
{
$displayedNode = $this->getSession()->getPage()->find('css', $element);
if ($displayedNode === null) {
throw new \Exception("The element '{$element}' was not found anywhere in the page");
}
$message = "The element '{$element}' is not visible";
$this->assertTrue($displayedNode->isVisible(), $message);
}