示例#1
0
 public void GetConfigData()
 {
     try
     {
         Configuration oConfig = new Configuration();
         this.currentDirectory = oConfig.CurrentDirectory;
         this.server = oConfig.Server;
         this.browserId = oConfig.BrowserId;
         this.applicationURL = oConfig.ApplicationURL;
         this.userName = oConfig.UserName;
         this.password = oConfig.Password;
         this.timeout = oConfig.Timeout;
         this.webConfigFilePath = oConfig.WebConfigFilePath;
         this.applicationLogDirectory = oConfig.ApplicationLogDirectory;
         this.driverPath = oConfig.DriverPath;
         this.outlookPath = oConfig.OutlookPath;
         this.projectDirectory = oConfig.ProjectDirectory;
         this.testDataDirectory = oConfig.TestDataDirectory;
         this.testScriptDirectory = oConfig.TestScriptDirectory;
         this.genericDataDirectory = oConfig.GenericDataDirectory;
         this.preReqDataDirectory = oConfig.PreReqDataDirectory;
         this.customResultDirectory = oConfig.CustomResultDirectory;
         this.htmlReportDirectory = oConfig.HtmlReportDirectory;
         this.csvLogDirectory = oConfig.CsvLogDirectory;
         this.emailTo = oConfig.EmailTo;
         this.emailFrom = oConfig.EmailFrom;
         this.emailSubject = oConfig.EmailSubject;
         this.emailMessage = oConfig.EmailMessage;
         this.emailSMTPServer = oConfig.EmailSMTPServer;
         this.emailUserName = oConfig.EmailUserName;
         this.emailPassword = oConfig.EmailPassword;
         this.logFileDirectory = oConfig.LogFileDirectory;
         this.reportFileDirectory = oConfig.ReportFileDirectory;
     }
     catch (Exception exception)
     {
         Console.WriteLine("Exception in LoadConfigData " + exception.Message);
     }
 }
示例#2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="testScriptName"></param>
        /// <returns></returns>
        protected string PrepareObjectRepositoryFilePath(string pagetype,string roletype)
        {
            Configuration oConfig = new Configuration();
            this.currentDirectory = oConfig.CurrentDirectory;
            this.projectDirectory = oConfig.ProjectDirectory;

            return this.currentDirectory + this.projectDirectory + "\\ObjectRepository\\" + pagetype + "_" + roletype + ".xml";
        }