예제 #1
0
파일: CpNote.cs 프로젝트: MohanK298/AA
        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");
        }
예제 #2
0
        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();
        }
 public void selectVersion(string num)
 {
     _closeChangingVersionWatcher.Start();
     repo.ResultsAnalysis.SelectVersion.SelectedItemText = "Version " + num;
     Delay.Seconds(2);
     _closeChangingVersionWatcher.Stop();
 }
예제 #4
0
        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();
        }
예제 #5
0
 private void Init()
 {
     _closingManagerInstancesWatcher = new PopupWatcher();
     _closingManagerInstancesWatcher.Watch(@"/form[@title='MyAssays Desktop Setup']/?/?/radiobutton[@text~'^&Close\ the\ applications\ a']", CloseAllMyAssaysWindows);
     _closingManagerInstancesWatcher.Start();
     _setupUnableTextWatcher = new PopupWatcher();
     _setupUnableTextWatcher.Watch(@"/form[@title='MyAssays Desktop Setup']/text[@windowtext='The setup was unable to automatically close all requested applications. Please ensure that the applications holding files in use are closed before continuing with the installation.']", CloseAllWindows);
     _setupUnableTextWatcher.Start();
 }
예제 #6
0
        /// <summary>
        /// This method gets called right after the recording has been started.
        /// It can be used to execute recording specific initialization code.
        /// </summary>
        private void Init()
        {
            // Your recording specific initialization code goes here.
            // Create PopupWatcher
            PopupWatcher myPopupWatcher = new PopupWatcher();

            // Add a Watch using a RanoreXPath and triggering the Method CloseUpdateCheckDialog
            //myPopupWatcher.Watch("/form[@controlname='UpdateCheckForm']/button[@controlname='m_btnClose']", CloseUpdateCheckDialog);
            myPopupWatcher.Watch("/dom[@domain='192.168.0.1']//div[#'warningWizard']/div[2]", CloseUpdateCheckDialog);
            // Start PopupWatcher
            myPopupWatcher.Start();
        }
예제 #7
0
        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);
        }
예제 #8
0
        public static PopupWatcher PauseWhileExists(RepoItemInfo findElement)
        {
            CheckArgumentNotNull(findElement, "findElement");

            var key = findElement.GetMetaInfos()["id"];

            if (watchers.ContainsKey(key))
            {
                throw new ArgumentException("Popup watcher with given parameters already exists.");
            }

            var watcher = new PopupWatcher();

            watcher.Watch(findElement, RequestPauseWhileExists);
            watcher.Start();
            watchers.Add(key, watcher);
            Report.Info(string.Format("Started watching for '{0}'.", findElement.FullName));
            return(watcher);
        }
예제 #9
0
        private void Inspection_Load(object sender, EventArgs e)
        {
            //Sim List
            DirectoryInfo DI = new DirectoryInfo(strFilePath);

            if (DI.Exists)
            {
                DirectoryInfo[] CInfo = DI.GetDirectories();
                foreach (DirectoryInfo di in CInfo)
                {
                    WinForms.ListViewItem jlvi = new WinForms.ListViewItem(di.Name);
                    lvnorjob.Items.Add(jlvi);
                }
            }


            //Automation_JobLoading.Module.ConvertJob.Start();
            Log.LogWrite("---Automation Program Load---");

            Ranorex.Core.Reporting.TestReport.Setup(ReportLevel.None, null, false);
            try
            {
                pwVisionError.Watch("/form[@title~'Vision Error.*']", SaveErrorImage);
                pwVisionError.Watch("/form[@title='Error Report']", SaveErrorImage);
                pwVisionError.Watch("/form[@title~'Optional update delivery ']", SaveErrorImage);
                //pwVisionError.Watch("/ form[@title~'Input Production Quantity']", SaveErrorImage);
                pwVisionError.Watch("/form[@processname='KY-3030' and @class='#32770']", SaveErrorImage);
                pwVisionError.Watch("/form[@title='KSMARTVisionApplication']", SaveErrorImage);
                pwVisionError.Watch("/form[@title~'KSmart connection disconn']", SaveErrorImage);

                pwVisionError.Start();
            }
            catch (Exception ex)
            {
                Report.Error("Unexpected exception occurred: " + ex.ToString());
            }
            throw new NotImplementedException();
        }
예제 #10
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Log.LogWrite("---Automation Program Load---");

            Ranorex.Core.Reporting.TestReport.Setup(ReportLevel.None, null, false);
            try
            {
                pwVisionError.Watch("/form[@title~'Vision Error.*']", SaveErrorImage);
                pwVisionError.Watch("/form[@title='Error Report']", SaveErrorImage);
                pwVisionError.Watch("/form[@title~'Optional update delivery ']", SaveErrorImage);
                //pwVisionError.Watch("/ form[@title~'Input Production Quantity']", SaveErrorImage);
                pwVisionError.Watch("/form[@processname='KY-3030' and @class='#32770']", SaveErrorImage);
                pwVisionError.Watch("/form[@title='KSMARTVisionApplication']", SaveErrorImage);
                pwVisionError.Watch("/form[@title~'KSmart connection disconn']", SaveErrorImage);

                pwVisionError.Start();
            }
            catch (Exception ex)
            {
                Report.Error("Unexpected exception occurred: " + ex.ToString());
            }
            throw new NotImplementedException();
        }