public void TC03_FPWeb_Admin_Rostering_ShiftAdministration() { clsLoginPage loginPage = new clsLoginPage(); loginPage.LoginPage(); var TopbarMenu = new clsMainPage_TopbarMenu(); TopbarMenu.NavigatetoShiftAdministration(); var ShiftAdministration = new clsShiftAdministration(); ShiftAdministration.AddShiftdetails("Night", "N", "08:00", "9:00", "BFM"); TopbarMenu.NavigatetoShiftAdministration(); ShiftAdministration.EditShiftdetails("Night", "12:00"); TopbarMenu.NavigatetoShiftAdministration(); ShiftAdministration.CopyShiftdetails("Night", "Night-Copy", "11:00"); TopbarMenu.NavigatetoShiftAdministration(); ShiftAdministration.DeleteShiftdetails("Night"); // TopbarMenu.Logout(); }
public void CopyShiftAdmin() { strTestCaseNo = "TC004_Reg"; strtblname = "automation_shiftadministration"; strTestType = "Regression"; PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC04_CopyShiftAdmin"); FpAdminMenus adminmenus = new FpAdminMenus(); adminmenus.AdminClick(); adminmenus.LnkShiftAdministration.Click(); clsShiftAdministration shiftadmin = new clsShiftAdministration(); var connection = new ConnectToMySQL_Fetch_TestData(); var testdataShift = connection.Select(strtblname, strTestCaseNo, strTestType); strShiftName = testdataShift[4]; shiftadmin.CopyShiftdetails(strShiftName); string[] shiftdetails = shiftadmin.RetrieveShiftdetails(strShiftName + " (Copy)"); string strfbwebshiftname = shiftdetails[0]; string strfbwebshortcode = shiftdetails[1]; string strfbwebstarttime = shiftdetails[2]; string strfbwebDuration = shiftdetails[3]; string strfbwebCurrencies = shiftdetails[4]; string strfbwebStatus = shiftdetails[5]; try { Assert.AreEqual(strShiftName + " (Copy)", strfbwebshiftname); PropertiesCollection.test.Log(Status.Pass, strfbwebstarttime + " Copied Shift Name validated Succesfully"); } catch { PropertiesCollection.test.Log(Status.Fail, strfbwebstarttime + " Copied Shift Name not validated Succesfully"); } try { Assert.AreEqual(strUpdatedStartdate, strfbwebstarttime); PropertiesCollection.test.Log(Status.Pass, strfbwebstarttime + " Copied Shift Start Date validated Succesfully"); } catch { PropertiesCollection.test.Log(Status.Fail, strfbwebstarttime + " Copied Shift Start Date not validated Succesfully"); } try { Assert.AreEqual(strUpdatedDuration, strfbwebDuration); PropertiesCollection.test.Log(Status.Pass, strfbwebstarttime + " Copied Shift Duration validated Succesfully"); } catch { PropertiesCollection.test.Log(Status.Fail, strfbwebstarttime + " Copied Shift Duration not validated Succesfully"); } Thread.Sleep(4000); }