对于 Chrome,我有以下代码:
List<String> capabilityValue = new List<string>();
capabilityValue.Add("--start-maximized");
capabilities = DesiredCapabilities.Chrome();
capabilities.SetCapability("chrome.switches", capabilityValue);
capabilities.Platform = new Platform(platform);
WebDriver driver = new WebDriver ("www.google.com", capabilities);
我尝试替换chrome.switches
为firefox.switches
. 对于 Mozilla Firefox,这不起作用。
谁能知道我怎样才能最大限度地打开网站?