public void AutoSetUp_ThrowsArgumentException(string[] browserNames)
        {
            var exception = Assert.Throws <ArgumentException>(() =>
                                                              DriverSetup.AutoSetUp(browserNames));

            exception.Message.Should().ContainEquivalentOf("unsupported");
        }
        public void AutoSetUp(string browserName)
        {
            var result = DriverSetup.AutoSetUp(browserName);

            AssertDriverIsSetUp(result, browserName);
            AssertVersionCache(browserName);
        }
示例#3
0
        public void SetUp()
        {
            DriverJsonMapperAliases.Register <RemoteDriverJsonMapperOverride>(DriverAliases.Remote);
            DriverJsonMapperAliases.Register <ChromeDriverJsonMapperOverride>(DriverAliases.Chrome);
            DriverJsonMapperAliases.Register <FirefoxDriverJsonMapperOverride>(DriverAliases.Firefox);
            DriverJsonMapperAliases.Register <InternetExplorerDriverJsonMapperOverride>(DriverAliases.InternetExplorer);
            DriverJsonMapperAliases.Register <EdgeDriverJsonMapperOverride>(DriverAliases.Edge);

            DriverSetup.AutoSetUp(BrowserNames.Chrome, BrowserNames.Firefox, BrowserNames.Edge, BrowserNames.InternetExplorer);
        }
        public void GlobalSetUp()
        {
            try
            {
                PingTestApp();
            }
            catch (WebException)
            {
                RunTestApp();
            }

            DriverSetup.AutoSetUp(BrowserNames.Chrome);
        }
        public void GlobalSetUp()
        {
            RetrySettings.ThreadBoundary = RetrySettingsThreadBoundary.AsyncLocal;

            try
            {
                PingTestApp();
            }
            catch (WebException)
            {
                RunTestApp();
            }

            DriverSetup.AutoSetUp(BrowserNames.Chrome);
        }
示例#6
0
        public DynamicFormTest(ITestOutputHelper output)
        {
            DriverSetup.AutoSetUp(BrowserNames.Chrome);

            AtataContext.Configure()
            .UseChrome()
            .AddLogConsumer(new XUnitLogConsumer(output))
            .WithMinLevel(LogLevel.Trace)
            .AddScreenshotFileSaving()
            .Build();

            ValueRandomizer.RegisterRandomizer <DateTime>((meta) =>
            {
                return(DateTime.Now.AddDays(0 - Randomizer.GetInt(0, 10000)));
            });
        }
示例#7
0
        public void GlobalSetUp()
        {
            AtataContext.GlobalConfiguration
            .UseDriver(() =>
            {
                EdgeOptions options = new EdgeOptions
                {
                    UseChromium = true
                };

                options.AddArguments("headless", "disable-gpu", "window-size=1024,768");

                return(new EdgeDriver(options));
            })
            .UseBaseUrl("https://demo.atata.io/")
            .UseCulture("en-US")
            .UseAllNUnitFeatures();

            DriverSetup.AutoSetUp(BrowserNames.Edge);
        }
 private static void SetUpDriver() =>
 DriverSetup.AutoSetUp(BrowserNames.Chrome);
 public void AutoSetUp_ThrowsArgumentNullException(string[] browserNames)
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           DriverSetup.AutoSetUp(browserNames));
 }
        public void AutoSetUp(string[] browserNames)
        {
            var results = DriverSetup.AutoSetUp(browserNames);

            AssertAutoSetUpDriverResults(results, browserNames);
        }