public function assertBodyHasNotVisibleElement($cssSelector, $timeout = 5000) { try { S::waitForElementNotVisible($cssSelector, $timeout); $this->assertTrue(true, "Element found"); } catch (TimeOutException $e) { $this->fail("Element is still visible. "); } }