public void RequestingUnsupportedHeadlessBrowserThrowsInformativeException(Browser browser) { Action act = () => StaticWebDriverFactory.GetLocalWebDriver(browser, true); act.Should() .ThrowExactly <ArgumentException>($"because headless mode is not supported on {browser}.") .WithMessage($"Headless mode is not currently supported for {browser}."); }
public void RequestingUnsupportedWebDriverThrowsInformativeException(Browser browser) { Action act = () => StaticWebDriverFactory.GetLocalWebDriver(browser); act.Should() .Throw <PlatformNotSupportedException>($"because {browser} is not supported on {thisPlatformType}.") .WithMessage("*is only available on*"); }
public void FhdBrowserIsOfRequestedSize() { Driver = StaticWebDriverFactory.GetLocalWebDriver(StaticDriverOptionsFactory.GetFirefoxOptions(true), WindowSize.Fhd); Assert.Multiple(() => { Size size = Driver.Manage().Window.Size; size.Height.Should().Be(1080); size.Width.Should().Be(1920); }); }
public void Initialize() { _driver = StaticWebDriverFactory.GetRemoteWebDriver(browser: _browser, gridUrl: new Uri("http://localhost:4444/wd/hub"), proxy: null); //_driver = StaticWebDriverFactory.GetLocalWebDriver(_browser, false); }
public void HeadlessBrowsersCanBeLaunched(Browser browser) { Driver = StaticWebDriverFactory.GetLocalWebDriver(browser, true); Driver.Url = "https://example.com/"; Driver.Title.Should().Be("Example Domain"); }
public void LocalWebDriverCanBeLaunchedAndLoadExampleDotCom(Browser browser) { Driver = StaticWebDriverFactory.GetLocalWebDriver(browser); Driver.Url = "https://example.com/"; Driver.Title.Should().Be("Example Domain"); }
public void RemoteWebDriverCanBeLaunchedAndLoadExampleDotCom(Browser browser) { Driver = StaticWebDriverFactory.GetRemoteWebDriver(browser, new Uri("http://localhost:4444/wd/hub"), PlatformType.Any); Driver.Url = "https://example.com/"; Driver.Title.Should().Be("Example Domain"); }
public void LocalWebDriverCanBeLaunchedAndLoadExampleDotCom() { LocalDriver = StaticWebDriverFactory.GetLocalWebDriver((int)Browser.Firefox); LocalDriver.Url = "https://example.com/"; LocalDriver.Title.Should().Be("Example Domain"); }