public void FillPayrollDetails() { string payrollId = GenericHelper.RandomPayRollNo(); ExcelOperation.AddData("TestData4", payrollId, "TC4_AddingThePackageToTheEmployee"); PayRollID.SendKeys(payrollId); var eleImg = driver.FindElement(By.XPath(".//*[@id='ddmPayCycleID_trMain']/td[2]/img")); IJavaScriptExecutor executor = (IJavaScriptExecutor)driver; executor.ExecuteScript("var eleImg=arguments[0];setTimeout(function(){eleImg.click();},100)", eleImg); // Selects first item fromn Pay Cycle Description drop down var eleDropDown = driver.FindElement(By.XPath(".//*[@id='divMenuddmPayCycleID']/table/tbody/tr[2]/td[1]")); IJavaScriptExecutor executor1 = (IJavaScriptExecutor)driver; executor1.ExecuteScript("var eleDropDown=arguments[0];setTimeout(function(){eleDropDown.click();},100)", eleDropDown); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30); Thread.Sleep(2000); //Click on the AddButton var eleAddButton = driver.FindElement(By.XPath(".//*[@id='wucButtons_cmdAddEnabled']")); IJavaScriptExecutor executorAddButton = (IJavaScriptExecutor)driver; executorAddButton.ExecuteScript("var eleAddButton=arguments[0];setTimeout(function(){eleAddButton.click();},100)", eleAddButton); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30); Thread.Sleep(2000); // Clicks on Save button GenericHelper.AllScreenShot(driver); var eleSaveButton = driver.FindElement(By.Id("wucButtons_cmdSaveEnabled")); IJavaScriptExecutor executorSaveButton = (IJavaScriptExecutor)driver; executorSaveButton.ExecuteScript("var eleSaveButton=arguments[0];setTimeout(function(){eleSaveButton.click();},100)", eleSaveButton); }
public void PaymentReference() { string paymentReference = GenericHelper.RandomString(6); if (ScenarioContext.Current.ScenarioInfo.Title == "TC7-Adding Adhoc Payment Instruction") { ExcelOperation.AddData("TestData4", paymentReference, "TC7_AddingAdhocPaymentInstruction"); } else { ExcelOperation.AddData("TestData4", paymentReference, "TC8_AddingRegularPaymentInstruction"); } PaymentRefrerences.SendKeys(paymentReference); }
public void PaymentDescriptionTextBox() { string randomString = GenericHelper.RandomString(6); PropertiesFile.Properties.PaymentDescription = randomString; if (ScenarioContext.Current.ScenarioInfo.Title == "TC7-Adding Adhoc Payment Instruction") { ExcelOperation.AddData("TestData3", randomString, "TC7_AddingAdhocPaymentInstruction"); } else { ExcelOperation.AddData("TestData3", randomString, "TC8_AddingRegularPaymentInstruction"); } PaymentDescription.SendKeys(randomString); }
public void GetEmployeeIdAndUpdateInExcel() { string EmployeeID = driver.FindElement(By.XPath(".//*[@id='wucPackageSummary_tdEmployeeNo']/a")).Text; ExcelOperation.AddData("TestData1", EmployeeID, "TC2_SearchTheEmployee"); ExcelOperation.AddData("TestData1", EmployeeID, "TC3_VerifyEAMSIsConfiguredToNewEmployee"); ExcelOperation.AddData("TestData1", EmployeeID, "TC4_AddingThePackageToTheEmployee"); ExcelOperation.AddData("TestData1", EmployeeID, "TC5_ActivatingTheNewPackage"); ExcelOperation.AddData("TestData1", EmployeeID, "TC6_EditPackageAndSaveTheDetails"); ExcelOperation.AddData("TestData1", EmployeeID, "TC7_AddingAdhocPaymentInstruction"); ExcelOperation.AddData("TestData1", EmployeeID, "TC8_AddingRegularPaymentInstruction"); ExcelOperation.AddData("TestData1", EmployeeID, "TC9_OrderingTheCard"); }
public void AddAdminFees() { SearchImg.Click(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); // Click to open admin search pop up EmployeeOfferingScreen EmpOff = new EmployeeOfferingScreen(driver); EmpOff.ClickOnSearchResult(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); // Select current business date from screen var text_input = driver.FindElement(By.XPath(".//*[@id='Form1']/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/font")).Text; var result = text_input.Substring(text_input.Length - 11); string currentDate = result.Remove(result.Length - 1); ExcelOperation.AddData("TestData2", currentDate, "TC5_ActivatingTheNewPackage"); EffectiveDtae.SendKeys(currentDate); SaveButton.Click(); }
public void FillReimbursementDetails() { EffectiveDate.Clear(); // Select Current business date from screen var text_input = driver.FindElement(By.XPath(".//*[@id='Form1']/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/font")).Text; var result = text_input.Substring(text_input.Length - 11); string currentDate = result.Remove(result.Length - 1); ExcelOperation.AddData("TestData17", currentDate, "TC1_CreateAnEmployee"); EffectiveDate.SendKeys(currentDate); PreferedMethodToContact.Click(); ChequeAddress.Click(); EFTRemittanceCommunicationDetailsMethod.Click(); IQueueNumberText.Clear(); IQueueNumberText.SendKeys(ExcelOperation.GetData[18]); GenericHelper.AllScreenShot(driver); NextButton.Click(); }
public void FillPersonalDetails() { SelectElement oSelect = new SelectElement(driver.FindElement(By.Id("TitleCombo"))); oSelect.SelectByText(ExcelOperation.GetData[1]); GivenName.Clear(); string GivenNameString = GenericHelper.RandomString(5); ExcelOperation.AddData("TestData2", GivenNameString, "TC1_CreateAnEmployee"); GivenName.SendKeys(GivenNameString); OtherName.Clear(); OtherName.SendKeys(ExcelOperation.GetData[3]); Surname.Clear(); Surname.SendKeys(ExcelOperation.GetData[4]); PreferenceName.Clear(); PreferenceName.SendKeys(ExcelOperation.GetData[5]); DateOfBirth.Clear(); DateOfBirth.SendKeys(ExcelOperation.GetData[6]); Gender.Click(); MobNumber.Clear(); // MobNumber.SendKeys(ExcelOperation.GetData[7]); MobNumber.SendKeys("9999 999999"); EmailID.Clear(); EmailID.SendKeys(ExcelOperation.GetData[8]); PerferedMethodToContact.Click(); GenericHelper.AllScreenShot(driver); var ele = driver.FindElement(By.Id("CommandButtons_cmdNextEnabled")); IJavaScriptExecutor executor = (IJavaScriptExecutor)driver; executor.ExecuteScript("var ele=arguments[0];setTimeout(function(){ele.click();},100)", ele); }