📜  pfgecr firefoxdriver 设置大小窗口 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:19.031000             🧑  作者: Mango

代码示例1
FirefoxOptions firefoxOptions = new FirefoxOptions();
  firefoxOptions.AddArguments("--headless");
  firefoxOptions.AddArguments("--window-size=1920,1080");

  FirefoxDriver firefoxDriver = new FirefoxDriver(firefoxOptions);

  firefoxDriver.Manage().Window.Maximize();

  firefoxDriver.Navigate().GoToUrl("https://www.google.com/");
  var size = firefoxDriver.Manage().Window.Size; //{Width = 1366 Height = 768}