public static void ReadApplicationConfigs(string pathOfCurrentContext = null) { string automationDirectory = AppDomain.CurrentDomain.RelativeSearchPath ?? AppDomain.CurrentDomain.BaseDirectory; ObjectRepository = automationDirectory + TextDataParser.GetValue("ObjectRepository"); WaitingShortTime = Int32.Parse(ConfigurationManager.AppSettings["WaitingShortTime"]); WaitingMediumTime = Int32.Parse(ConfigurationManager.AppSettings["WaitingMediumTime"]); WaitingLongTime = Int32.Parse(ConfigurationManager.AppSettings["WaitingLongTime"]); }//end method ReadConfigs
}//end method ReadApplicationConfigs /// <summary> /// Read the provided test configurations /// </summary> public static void ReadConfigs(string pathOfAutomationConfigs) { //Application Settings: load the Automation Directory Configs TextDataParser.LoadConfigurationValues(pathOfAutomationConfigs); AutomationDirectory = TextDataParser.LoadAndGetValue("AutomationDirectory", pathOfAutomationConfigs + ".dir"); AutomationDirectory = TextDataParser.GetValue("AutomationDirectory"); Url = TextDataParser.GetValue("Url"); Browser = TextDataParser.GetValue("Browser"); //Files: Test Data, Messages, ... TestDataFile = AutomationDirectory + TextDataParser.GetValue("TestDataFile"); LogFile = AutomationDirectory + TextDataParser.GetValue("LogFile"); ReportingDirectory = AutomationDirectory + TextDataParser.GetValue("ReportingDirectory"); }//end method ReadConfigs
}//end method ReadApplicationConfigs /// <summary> /// Read the provided test configurations /// </summary> public static void ReadConfigs(string pathOfAutomationConfigs) { //Reporting Directory //Load the Automation Configs // TextDataParser.LoadAndSetValue("DownloadChromeDirectory", SetDownloadDirectoryPath(),pathOfAutomationConfigs); TextDataParser.LoadConfigurationValues(pathOfAutomationConfigs); Url = TextDataParser.GetValue("Url"); Browser = TextDataParser.GetValue("Browser"); //Files: Test Data, Messages TestDataFile = AutomationDirectory + TextDataParser.GetValue("TestDataFile"); LogDirectory = AutomationDirectory + TextDataParser.GetValue("LoggingDirectory"); ReportingDirectory = AutomationDirectory + TextDataParser.GetValue("ReportingDirectory"); }//end method ReadConfigs
} //end method /// <summary> /// Read the provided test configurations /// </summary> public static void ReadConfigs(string pathOfAutomationConfigs) { //Application Settings: load the Automation Directory Configs TextDataParser.LoadConfigurationValues(pathOfAutomationConfigs); //TODO: the below line is used to when the batch file is running. AutomationDirectory = TextDataParser.LoadAndGetValue("AutomationDirectory", pathOfAutomationConfigs + ".dir"); AutomationDirectory = TextDataParser.GetValue("AutomationDirectory"); Url = TextDataParser.GetValue("Url"); Browser = TextDataParser.GetValue("Browser"); //Files: Test Data, Messages, ... TestDataFile = AutomationDirectory + TextDataParser.GetValue("TestDataFile"); LogFile = AutomationDirectory + TextDataParser.GetValue("LogFile"); ReportingDirectory = AutomationDirectory + TextDataParser.GetValue("ReportingDirectory"); //TODO: Add the report path here ya Asmaa }//end method ReadConfigs
public static void ReadConfigs(string pathOfCurrentContext = null) { if (pathOfCurrentContext != null) { //Application Settings AutomationDirectory = pathOfCurrentContext; //commented by asmaa on August 30th //ObjectRepository = pathOfCurrentContext + TextDataParser.GetValue("ObjectRepository"); } else { //Application Settings AutomationDirectory = TextDataParser.GetValue("AutomationDirectory"); } ObjectRepository = AutomationDirectory + TextDataParser.GetValue("ObjectRepository"); } //end method ReadConfigs