getSession()->visit($this->pathTo('/js_test.html')); $webAssert = $this->getAssertSession(); $clicker = $webAssert->elementExists('css', '.elements div#clicker'); $invisible = $webAssert->elementExists('css', '#invisible'); $this->assertFalse($invisible->isVisible()); $this->assertTrue($clicker->isVisible()); } }