How can I run headless Firefox in the window size (1920, 1080) in C#?
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}
Any suggestions, how to run in full HD? I need to set here...
For example with chrome working correctly:
ChromeOptions options = new ChromeOptions();
options.AddArguments("headless");
options.AddArguments("window-size=1920x1080");
I am able to run firefox without GUI on ubuntu after a couple of search, here you can try