public void Perform() { PopupWatcher unpostedContinue = new PopupWatcher(); unpostedContinue.WatchAndClick(bill.PromptForm, bill.PromptForm.btnYesInfo); unpostedContinue.Start(); bill.MainForm.btnBilling.Click(); bill.MainForm.ToolbarBill.Click(); bill.MainForm.SelectBill.Click(); bill.BillingDetailForm.SelectFile.Click(); te.FileSelectForm.btnQuickFind.Click(); te.FindFilesForm.txtFind.TextValue = fileName + time; te.FindFilesForm.btnOK.Click(); te.FileSelectForm.listFirstFound.DoubleClick(); Validate.Exists(bill.BillingDetailForm.BillValueInfo); bill.BillingDetailForm.btnSendtoFinal.Click(); bill.BillingDetailForm.btnPrintPost.Click(); bill.InvoiceEmailForm.Checkbox.Click(); bill.InvoiceEmailForm.btnProceed.Click(); Delay.Milliseconds(500); bill.OutputPromptForm.btnOk.Click(); if (bill.PromptForm.btnOk1Info.Exists()) { bill.PromptForm.btnOk1.Click(); } bill.ReportViewerForm.btnClose.Click(); bill.BillingDetailForm.btnClose.Click(); unpostedContinue.Stop(); }
void BrowserVerify() { // Host.Local.RunApplication("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"); // Host.Local.ClearBrowserCache("chrome"); Host.Local.OpenBrowser("https://test.amicusanywhere.com/Portal"); cp.AmicusAttorney.Self.EnsureVisible(); cp.AmicusAttorney.LoginPage.TbEmailInfo.WaitForExists(Utilities.Constants.customWaitTime); cp.AmicusAttorney.LoginPage.TbEmail.PressKeys("*****@*****.**"); cp.AmicusAttorney.LoginPage.TbPwd.PressKeys("Password123$$"); cp.AmicusAttorney.LoginPage.BtLogin.Click(); PopupWatcher activeSessionDialog = new PopupWatcher(); activeSessionDialog.WatchAndClick(cp.AmicusAttorney.LoginPage.ContinueToLoginAnywayInfo, cp.AmicusAttorney.LoginPage.ContinueToLoginAnywayInfo); activeSessionDialog.Start(); try { cp.AmicusAttorney.Main.UserNameInfo.WaitForExists(Utilities.Constants.customWaitTime * 10); Report.Log(ReportLevel.Info, "Client Portal Login Successfully for client: " + cp.AmicusAttorney.Main.UserName.GetAttributeValue <String>("InnerText").ToString()); Report.Log(ReportLevel.Info, "Client Portal build number under curent test is " + cp.AmicusAttorney.Main.BuildNumber.GetAttributeValue <String>("InnerText").ToString()); } catch (Exception) { Report.Log(ReportLevel.Error, "Failed to login Client Portal within 30 seconds, terminating the Client Portal test case"); } activeSessionDialog.Stop(); cp.AmicusAttorney.Main.LkLogout.Click(); Delay.Seconds(5); Host.Local.KillBrowser("chrome"); }
public void PerformTimeEntry() { PopupWatcher timeEntryCombine = new PopupWatcher(); timeEntryCombine.WatchAndClick(te.PromptForm, te.PromptForm.btnYesInfo); timeEntryCombine.Start(); te.MainForm.btnTimeFeesExpenses.Click(); te.MainForm.btnMenuItem.Click(); te.AmicusAttorneyXWin.MenuItemNewItemsMenuItemIndex.Click(); // te.AmicusAttorneyXWin.MenuPopup.Click("58;21"); te.FileSelectForm.btnQuickFind.Click(); te.FindFilesForm.txtFind.TextValue = fileName; te.FindFilesForm.btnOK.Click(); te.FileSelectForm.listFirstFound.DoubleClick(); te.TimeEntryDetailsForm.txtActivityDescription.PressKeys(activityDescription); te.TimeEntryDetailsForm.btnOK.Click(); //Verify te.MainForm.rdbtnTimeFees.Click(); te.MainForm.listFirstTimeEntryFile.DoubleClick(); Report.Success("Create Time Entry for Billing passed"); te.TimeEntryDetailsForm.btnPost.Click(); timeEntryCombine.Stop(); //te.TimeEntryDetailsForm.btnOK.Click(); }
public static PopupWatcher StartPopupWatcher(RepoItemInfo findElement, RepoItemInfo clickElement) { var key = findElement.GetMetaInfos()["id"] + clickElement.GetMetaInfos()["id"]; if (watchers.ContainsKey(key)) { throw new ArgumentException("Popup watcher with given parameters already exists."); } var watcher = new PopupWatcher(); watcher.WatchAndClick(findElement, clickElement); watcher.Start(); watchers.Add(key, watcher); Report.Info("Popup watcher started."); return(watcher); }