Example #1
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();
 }
Example #2
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();
        }
        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);
        }
Example #4
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();
        }
Example #5
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();
        }
 private void Init()
 {
     _closeChangingVersionWatcher = new PopupWatcher();
     _closeChangingVersionWatcher.Watch(@"/form[@title='MyAssays Analysis']", confirmChangingVersion);
 }