コード例 #1
0
 public static void CloseUpdateCheckDialog(Ranorex.Core.Repository.RepoItemInfo myInfo, Ranorex.Core.Element myElement)
 {
     //Report.Info("Found popup warningWizard dialog windows");
     Report.Failure("Found popup warningWizard dialog windows");
     //myElement.CaptureCompressedImage();
     Report.Screenshot("warningWizard", myElement, true);
     myElement.As <Ranorex.Button>().Click();
 }
コード例 #2
0
ファイル: Extension.cs プロジェクト: nareshbandi123/ads
 public static void WaitForItemExists(this Ranorex.Core.Repository.RepoItemInfo info, int waitDuration)
 {
     try
     {
         info.WaitForExists(new Duration(waitDuration));
     }
     catch (Exception ex)
     {
         throw new Exception("Wait For Item Exists Failed : " + ex.Message);
     }
 }
コード例 #3
0
 public static bool WaitForItemExists(this Ranorex.Core.Repository.RepoItemInfo info, int waitDuration)
 {
     try
     {
         info.WaitForExists(new Duration(waitDuration));
         return(true);
     }
     catch
     {
         return(false);
     }
 }
コード例 #4
0
        /// <summary>
        /// The is host application open.
        /// </summary>
        /// <param name="processName">
        /// The process Name.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public static bool IsHostApplicationOpen(string processName = ProcessName)
        {
            Log.Enter(typeof(HostApplication), MethodBase.GetCurrentMethod().Name);

            GUI.DeviceCareApplication            deviceCareApplication = GUI.DeviceCareApplication.Instance;
            Ranorex.Core.Repository.RepoItemInfo repoItemInfo          = deviceCareApplication.MenuArea.MainMenu.MainMenuItems.ButtonExitInfo;

            Process[] processes = Process.GetProcesses();
            foreach (var process in processes)
            {
                if (process.ProcessName.Equals(processName))
                {
                    if (repoItemInfo.Exists())
                    {
                        Common.Tools.Log.Debug("Device Care is running.");
                        return(true);
                    }
                }
            }

            Common.Tools.Log.Debug("Device Care is not running.");
            return(false);
        }