예제 #1
0
        public void RequestingUnsupportedHeadlessBrowserThrowsInformativeException(BrowserTypes browser)
        {
            Action act = () => StaticWebDriverFactory.GetLocalWebDriver(browser, true);

            act.ShouldThrow <ArgumentException>($"because headless mode is not supported on {browser}.")
            .Message.ShouldBe($"Headless mode is not currently supported for {browser}.");
        }
예제 #2
0
        public void Uhd4KBrowserIsOfRequestedSize()
        {
            Driver = StaticWebDriverFactory.GetLocalWebDriver(StaticDriverOptionsFactory.GetFirefoxOptions(true), WindowSize.UHD4K);
            Size size = Driver.Manage().Window.Size;

            size.ShouldSatisfyAllConditions
            (
                () => size.Height.ShouldBe(2160),
                () => size.Width.ShouldBe(3840)
            );
        }
예제 #3
0
        public void HdBrowserIsOfRequestedSize()
        {
            //Driver = StaticWebDriverFactory.GetLocalWebDriver(StaticDriverOptionsFactory.GetFirefoxOptions(true), WindowSize.HD);
            Driver = StaticWebDriverFactory.GetLocalWebDriver <FirefoxDriver, FirefoxOptions>(StaticDriverOptionsFactory.GetFirefoxOptions(true));

            Size size = Driver.Manage().Window.Size;

            size.ShouldSatisfyAllConditions
            (
                () => size.Width.ShouldBe(1366),
                () => size.Height.ShouldBe(768)
            );
        }
예제 #4
0
 public void HeadlessBrowsersCanBeLaunched(BrowserTypes browser)
 {
     Driver     = StaticWebDriverFactory.GetLocalWebDriver(browser, true);
     Driver.Url = "https://example.com/";
     Driver.Title.ShouldBe("Example Domain");
 }
예제 #5
0
 public void LocalWebDriverCanBeLaunchedAndLoadExampleDotCom(BrowserTypes browser)
 {
     Driver     = StaticWebDriverFactory.GetLocalWebDriver(browser);
     Driver.Url = "https://example.com/";
     Driver.Title.ShouldBe("Example Domain");
 }