/// <summary>
        /// Validates that a module is open
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool IsModuleOpened()
        {
            bool result = true;
            Element moduleContainer = new GUI.ApplicationArea.MainView.ModuleContainerElements().ModuleContainer;
            if (moduleContainer == null)
            {
                result = false;
            }

            return result;
        }
Example #2
0
        /// <summary>
        /// Validates that a module is closed
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool IsOnlineModuleClosed()
        {
            bool    result          = true;
            Element moduleContainer = new GUI.ApplicationArea.MainView.ModuleContainerElements().ModuleContainerOnline;

            if (moduleContainer != null)
            {
                result = false;
            }

            return(result);
        }
        /// <summary>
        /// Validates that a module is already open or not (brings module to foreground if it is already open)
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool IsModuleAlreadyOpened()
        {
            bool result = false;
            Element moduleContainer = new GUI.ApplicationArea.MainView.ModuleContainerElements().ModuleContainer;
            if (moduleContainer != null)
            {
                moduleContainer.EnsureVisible();
                result = true;
            }

            return result;
        }
 /// <summary>
 /// Runs this instance.
 /// </summary>
 public void Run()
 {
     Ranorex.Core.Element moduleContainer = new GUI.ApplicationArea.MainView.ModuleContainerElements().ModuleContainer;
     if (moduleContainer == null)
     {
         Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Module Container is null. Taking screenshot from the entire Desktop");
         Log.Screenshot();
     }
     else
     {
         Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Taking screenshot of the module Historom");
         moduleContainer.EnsureVisible();
         Log.Screenshot(moduleContainer);
     }
 }