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(); }
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"); }
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()); }
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()); }
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(); }