/// <summary> /// Clicks on the Portfolios Under Review tab, clicks on the Record Payment button for a user-specified trainee, fills in the date and /// comments fields clicks the Submit button on the confirmation popup window /// </summary> /// <param name="traineeFullName"></param> public void RecordPayment(string traineeFullName) { ClickAndWait(PortfoliosUnderReviewTab); ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfoliosUnderReviewTbl, Bys.DiplomaCredentialStaffPage.PortfoliosUnderReviewTblFirstRow, traineeFullName, null, "Record Payment"); this.WaitUntil(Criteria.DiplomaCredentialStaffPage.RecordPaymentFormSubmitBtnVisible); RecordPaymentFormDateTxt.SendKeys("09/09/2017"); RecordPaymentFormDateTxt.SendKeys(Keys.Tab); Thread.Sleep(0200); RecordPaymentFormCommentsTxt.SendKeys("these are my comments :)"); ClickAndWait(RecordPaymentFormSubmitBtn); }
/// <summary> /// Clicks on the Portfolios Under Review tab, clicks on the Record Payment button for a user-specified trainee, fills in the date and /// comments fields clicks the Submit button on the confirmation popup window /// </summary> /// <param name="traineeFullName"></param> public void RecordPayment(string traineeFullName) { ClickAndWait(PortfoliosUnderReviewTab); ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfoliosUnderReviewTbl, Bys.DiplomaCredentialStaffPage.PortfoliosUnderReviewTblFirstRow, traineeFullName, "a", "Record Payment", "button"); this.WaitUntil(Criteria.DiplomaCredentialStaffPage.RecordPaymentFormSubmitBtnVisible); // Adding a sleep here because test failed on 1/10/18. When I looked at screenshot, it failed to enter text into the date box. Maybe // it needs to wait a little after this button appears. Monitor going forward Thread.Sleep(0300); RecordPaymentFormDateTxt.SendKeys("09/09/2017"); RecordPaymentFormDateTxt.SendKeys(Keys.Tab); Thread.Sleep(0200); RecordPaymentFormCommentsTxt.SendKeys("these are my comments :)"); ClickAndWait(RecordPaymentFormSubmitBtn); }