public void Read_MultiStepScenario_ShouldReturnAsScenarioList() { string excelFile = @"../../TestData/TestData.xlsx"; IScenarioReader reader = new ExcelScenarioReader(excelFile); string sheetName = "MultiStepScenario"; //string scenarioName = "SampleScenario"; var scenarios = reader.Read(sheetName); Assert.IsInstanceOfType(scenarios, typeof(IEnumerable <Scenario>)); }
public void CreateVat_CreateValidVAT_ShouldPass(string url, string fileName, string sheetName) { Boolean bResult = false; //try //{ IBrowserAutomator browser = new SeleniumBrowserAutomator(DriverType.CHROME, null, "", null); string excelFile = @"../../TestData/PIRA_VAT.xlsx"; //string.Concat(@"../",fileName); IScenarioReader reader = new ExcelScenarioReader(excelFile); var scenarios = reader.Read(sheetName); //scenarios = scenarios.Where(s => s.Name == scenarioName); AutomatedTestProcedure Add = new AutomatedTestProcedure(url, browser, scenarios); bResult = Add.BeginTesting(); Assert.IsTrue(bResult); }
public void _Filter() { XmlDocument webXml = new XmlDocument(); webXml.Load(@"../../Web.xml"); String url = Convert.ToString(webXml.SelectSingleNode("param").InnerText); Boolean bResult = false; IBrowserAutomator browser = new SeleniumBrowserAutomator(DriverType.CHROME, url, null, null); string excelFile = @"../../TestData/TestActions.xlsx"; IScenarioReader reader = new ExcelScenarioReader(excelFile); string sheetName = "Filter"; var scenarios = reader.Read(sheetName); AutomatedTestProcedure Add = new AutomatedTestProcedure(url, browser, scenarios); bResult = Add.BeginTesting(); Assert.IsTrue(bResult); }
public void executeTest(String url, String excelFile, String sheetName, string path, string finalSubPath) { Boolean bResult = false; string root = ConfigurationManager.AppSettings["Root_Path"]; string finalPath = System.IO.Path.Combine(root, path); string subPath = System.IO.Path.Combine(finalPath, finalSubPath); string timeStamp = System.IO.Path.Combine(subPath, DateTime.Now.ToString("yyyy-MM-dd-HH")); IBrowserAutomator browser = new SeleniumBrowserAutomator(DriverType.CHROME, finalPath, subPath, timeStamp); IScenarioReader reader = new ExcelScenarioReader(excelFile); var scenarios = reader.Read(sheetName); AutomatedTestProcedure Add = new AutomatedTestProcedure(url, browser, scenarios); bResult = Add.BeginTesting(); Assert.IsTrue(bResult); }