以下代码编写chrome以禁用网络安全
System.setProperty("webdriver.chrome.driver", "D:\\Eclipse\\chromedriver_win32\\chromedriver.exe");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
ChromeOptions options = new ChromeOptions();
/*options.addArguments("test-type");
options.addArgument("--start-maximized");*/
options.addArguments("--disable-web-security");
/* options.addArguments("--allow-running-insecure-content");*/
capabilities.setCapability("chrome.binary","D:/Eclipse/chromedriver_win32/chromedriver.exe");
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(options);
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(options);
但是我想为FF和IE禁用相同的功能。