Ejemplo n.º 1
0
        public void FhdBrowserIsOfRequestedSize()
        {
            Driver = this.WebDriverFactory.GetLocalWebDriver(StaticDriverOptionsFactory.GetFirefoxOptions(true), WindowSize.Fhd);

            Assert.Multiple(() =>
            {
                Size size = Driver.Manage().Window.Size;
                size.Height.Should().Be(1080);
                size.Width.Should().Be(1920);
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Construct a new instance of the CulturedDriverOptionsFactory for Chrome and Firefox
        /// </summary>
        /// <param name="requestedCulture"></param>
        public CulturedDriverOptionsFactory(CultureInfo requestedCulture) : base(new Dictionary <Type, DriverOptions>())
        {
            ChromeOptions chromeCultureOptions = StaticDriverOptionsFactory.GetChromeOptions(false);

            chromeCultureOptions.AddUserProfilePreference("intl.accept_languages", requestedCulture.ToString());
            DriverOptionsDictionary.Add(typeof(ChromeOptions), chromeCultureOptions);

            FirefoxOptions firefoxCultureOptions = StaticDriverOptionsFactory.GetFirefoxOptions();

            firefoxCultureOptions.SetPreference("intl.accept_languages", requestedCulture.ToString());
            DriverOptionsDictionary.Add(typeof(FirefoxOptions), firefoxCultureOptions);
        }