public function testShouldAllowToDisableJavascriptForHtmlUnitBrowser() { $capabilities = new DesiredCapabilities(); $capabilities->setBrowserName(WebDriverBrowserType::HTMLUNIT); $capabilities->setJavascriptEnabled(false); $this->assertFalse($capabilities->isJavascriptEnabled()); }