use capabilities CapabilityType.SUPPORTS_APPLICATION_CACHE
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import com.gargoylesoftware.htmlunit.BrowserVersion;
@@ -149,11 +150,13 @@ protected final synchronized WebDriver getWebDriver() {
if ("firefox".equals(browser)) {
final DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
+ capabilities.setCapability(CapabilityType.SUPPORTS_APPLICATION_CACHE, "true");
driver = new FirefoxDriver(capabilities);
driver.manage().window().maximize();
} else if ("chrome".equals(browser)) {
final ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--allow-insecure-localhost","--start-maximized");
+ chromeOptions.setCapability(CapabilityType.SUPPORTS_APPLICATION_CACHE, "true");
driver = new ChromeDriver(chromeOptions);
} else if ("htmlunit-firefox".equals(browser)) {
final HtmlUnitDriver htmlUnitDriver = new HtmlUnitDriver(BrowserVersion.FIREFOX_52);
