public void CreateABugXcel() { NavigationHelper.NavigationToURL(ObjectRepository.Config.GetWebsite()); HomePage hPage = new HomePage(ObjectRepository.Driver); LoginPage loginPage = hPage.NavigateToLogin(); BugDetail bugDetail = loginPage.LoginToPage(ObjectRepository.Config.GetUsername(), ObjectRepository.Config.GetPassword()); bugDetail.SelectDropdownList(TestContext.DataRow["Severity"].ToString(), TestContext.DataRow["HardWare"].ToString(), TestContext.DataRow["OS"].ToString()); bugDetail.FillInTextbox(TestContext.DataRow["Summary"].ToString(), TestContext.DataRow["Desc"].ToString()); bugDetail.SubmitBug(); hPage = bugDetail.Logout(); }
public void CreateBugDDF() { string xlPath = @"D:\Git\SeleniumWebdriver\DataFiles\DataForBug.xlsx"; Console.WriteLine(ExcelReaderHelper.GetCellData(xlPath, "Sheet1", 0, 0)); NavigationHelper.NavigationToURL(ObjectRepository.Config.GetWebsite()); HomePage hPage = new HomePage(ObjectRepository.Driver); LoginPage loginPage = hPage.NavigateToLogin(); BugDetail bugDetail = loginPage.LoginToPage(ObjectRepository.Config.GetUsername(), ObjectRepository.Config.GetPassword()); bugDetail.SelectDropdownList(ExcelReaderHelper.GetCellData(xlPath, "Sheet1", 1, 0).ToString(), ExcelReaderHelper.GetCellData(xlPath, "Sheet1", 1, 1).ToString(), ExcelReaderHelper.GetCellData(xlPath, "Sheet1", 1, 2).ToString()); bugDetail.FillInTextbox(ExcelReaderHelper.GetCellData(xlPath, "Sheet1", 1, 3).ToString(), ExcelReaderHelper.GetCellData(xlPath, "Sheet1", 1, 4).ToString()); bugDetail.SubmitBug(); hPage = bugDetail.Logout(); }