public void CustomSizeBrowserIsOfRequestedSize(WindowSize windowSize, int expectedWidth, int expectedHeight) { Driver = LocalWebDriverFactory.GetWebDriver( Browser.Firefox, windowSize, true, new Size(expectedWidth, expectedHeight)); Assertions.AssertThatBrowserWindowSizeIsCorrect(Driver, expectedWidth, expectedHeight); }
public void CustomSizeBrowserIsOfRequestedSize(WindowSize windowSize, int expectedWidth, int expectedHeight) { WebDriverConfiguration configuration = WebDriverConfigurationBuilder.Start() .WithBrowser(Browser.Firefox) .RunHeadless() .WithCustomSize(new Size(expectedWidth, expectedHeight)) .Build(); TestContext.WriteLine($"Configuration = {JsonConvert.SerializeObject(configuration, sizeJsonConverter)}"); Driver = WebDriverFactory.GetWebDriver(configuration); Assertions.AssertThatBrowserWindowSizeIsCorrect(Driver, expectedWidth, expectedHeight); }