Exemple #1
0
        public void LocalWebDriverFactoryWorks(Browser browser, BrowserVisibility browserVisibility)
        {
            IWebDriverConfiguration configuration = WebDriverConfigurationBuilder.Start()
                                                    .WithBrowser(browser)
                                                    .WithHeadless(browserVisibility == BrowserVisibility.Headless)
                                                    .Build();

            TestContext.WriteLine($"Configuration = {JsonConvert.SerializeObject(configuration, sizeJsonConverter)}");
            Driver = WebDriverFactory.GetWebDriver(configuration);
            Assertions.AssertThatPageCanBeLoaded(Driver);
        }
 public void RemoteWebDriverFactoryWorks(
     PlatformType platformType,
     Browser browser,
     BrowserVisibility browserVisibility = BrowserVisibility.OnScreen)
 {
     Driver = RemoteWebDriverFactory
              .GetWebDriver(browser, platformType, WindowSize.Fhd, browserVisibility == BrowserVisibility.Headless);
     Assertions.AssertThatPageCanBeLoaded(Driver);
     Driver.IsRunningHeadless().Should()
     .Be(browserVisibility == BrowserVisibility.Headless,
         $"{browserVisibility.ToString()} was requested");
 }
Exemple #3
0
        public void RemoteWebDriverFactoryWorks(
            PlatformType platformType,
            Browser browser,
            BrowserVisibility browserVisibility = BrowserVisibility.OnScreen)
        {
            IWebDriverConfiguration configuration = WebDriverConfigurationBuilder.Start()
                                                    .WithBrowser(browser)
                                                    .WithHeadless(browserVisibility == BrowserVisibility.Headless)
                                                    .RunRemotelyOn(gridUrl)
                                                    .WithPlatformType(platformType)
                                                    .Build();

            TestContext.WriteLine($"Configuration = {JsonConvert.SerializeObject(configuration, sizeJsonConverter)}");
            Driver = WebDriverFactory.GetWebDriver(configuration);
            Assertions.AssertThatPageCanBeLoaded(Driver);
            Driver.IsRunningHeadless().Should()
            .Be(browserVisibility == BrowserVisibility.Headless,
                $"{browserVisibility.ToString()} was requested");
        }
 public void LocalWebDriverFactoryWorks(Browser browser, BrowserVisibility browserVisibility)
 {
     Driver = LocalWebDriverFactory.GetWebDriver(browser, WindowSize.Hd, browserVisibility == BrowserVisibility.Headless);
     Assertions.AssertThatPageCanBeLoaded(Driver);
 }