Ejemplo n.º 1
0
        public void SetUp()
        {
#if NETCOREAPP2_0
            string baseUrl = "http://localhost:50549";
#else
            string baseUrl = System.Configuration.ConfigurationManager.AppSettings["TestAppUrl"];
#endif

            stringListLogConsumer = new StringListLogConsumer();

            AtataContext.Configure().
            UseChrome().
            WithArguments("disable-extensions", "no-sandbox", "start-maximized").
#if NETCOREAPP2_0
            WithFixOfCommandExecutionDelay().
            WithLocalDriverPath().
#endif
            UseBaseUrl(baseUrl).
            UseCulture("en-us").
            UseNUnitTestName().
            AddNUnitTestContextLogging().
            AddLogConsumer(stringListLogConsumer).
            LogNUnitError().
            Build();

            OnSetUp();
        }
Ejemplo n.º 2
0
        public void AddSecretStringsToMask()
        {
            var logConsumer = new StringListLogConsumer();

            sut.Use(new LogConsumerInfo(logConsumer));

            sut.AddSecretStringsToMask(
                new[] { new SecretStringToMask("abc123", "***") });

            sut.Info(@"Set ""abc123"" to something");

            logConsumer.Items[0].Message.Should().Be(@"Set ""***"" to something");
        }
Ejemplo n.º 3
0
        protected AtataContextBuilder ConfigureBaseAtataContext()
        {
            stringListLogConsumer = new StringListLogConsumer();

            return(AtataContext.Configure().
                   UseChrome().
                   WithArguments(GetChromeArguments()).
                   WithPortsToIgnore(portsToIgnore).
                   UseBaseUrl(BaseUrl).
                   UseCulture("en-us").
                   UseNUnitTestName().
                   AddNUnitTestContextLogging().
                   AddLogConsumer(stringListLogConsumer).
                   WithMessageNestingLevelIndent(string.Empty).
                   LogNUnitError());
        }
Ejemplo n.º 4
0
        protected AtataContextBuilder ConfigureBaseAtataContext()
        {
            stringListLogConsumer = new StringListLogConsumer();

            return(AtataContext.Configure().
                   UseChrome().
                   WithArguments("disable-extensions", "start-maximized", "disable-infobars").
#if NETCOREAPP2_0
                   WithFixOfCommandExecutionDelay().
                   WithLocalDriverPath().
#endif
                   UseBaseUrl(BaseUrl).
                   UseCulture("en-us").
                   UseNUnitTestName().
                   AddNUnitTestContextLogging().
                   AddLogConsumer(stringListLogConsumer).
                   LogNUnitError());
        }
Ejemplo n.º 5
0
        public void SetUp()
        {
            string baseUrl = ConfigurationManager.AppSettings["TestAppUrl"];

            stringListLogConsumer = new StringListLogConsumer();

            AtataContext.Configure().
            UseChrome().
            WithArguments("disable-extensions", "no-sandbox", "start-maximized").
            UseBaseUrl(baseUrl).
            UseNUnitTestName().
            AddNUnitTestContextLogging().
            AddLogConsumer(stringListLogConsumer).
            LogNUnitError().
            Build();

            OnSetUp();
        }