/// <summary> /// Create a logger /// </summary> /// <returns>A logger</returns> protected Logger CreateLogger() { this.LoggedExceptionList = new List <string>(); this.LoggingEnabledSetting = LoggingConfig.GetLoggingEnabledSetting(); // Setup the exception listener AppDomain currentDomain = AppDomain.CurrentDomain; if (LoggingConfig.GetFirstChanceHandler()) { currentDomain.FirstChanceException += this.FirstChanceHandler; } if (this.LoggingEnabledSetting != LoggingEnabled.NO) { return(LoggingConfig.GetLogger( StringProcessor.SafeFormatter( "{0} - {1}", this.GetFullyQualifiedTestClassName(), DateTime.UtcNow.ToString("yyyy-MM-dd-hh-mm-ss-ffff", CultureInfo.InvariantCulture)))); } else { return(new ConsoleLogger()); } }
/// <summary> /// Create a Selenium test object /// </summary> protected new void SetupTestObject() { ILogger newLogger = this.CreateAndSetupLogger(GetFileNameWithoutExtension(), LoggingConfig.GetLogType(), LoggingConfig.GetLoggingEnabledSetting(), LoggingConfig.GetFirstChanceHandler()); this.TestObject = CreateSpecificTestObject(newLogger); }