Exemple #1
0
        /// <summary>
        ///     Start via related menu-entry
        /// </summary>
        /// <returns>
        ///     <br>Button: If call worked fine</br>
        ///     <br>NULL: If an error occurred</br>
        /// </returns>
        public Element ViaMenu()
        {
            try
            {
                Element element = (new RunEnvelopeCurve()).ViaMenu();
                if (element != null && element.Enabled)
                {
                    // Select entry Set Cursor
                    MenuItem menuItem = (new Elements()).SubmenuSetCursor;
                    if (menuItem != null && menuItem.Enabled)
                    {
                        Mouse.MoveTo(menuItem, 500);
                        menuItem.Click(DefaultValues.locDefaultLocation);

                        // Select container for Envelope Curve -> Set Cursor menu entries
                        element = (new Elements()).MenuElement(HandleFunctions.GetHandle(element));
                        Mouse.MoveTo(element, DefaultValues.locDefaultLocation);
                        return(element);
                    }

                    EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Menu entry is not accessable");
                    return(null);
                }

                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Menu is not accessable");
                return(null);
            }
            catch (Exception exception)
            {
                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), exception.Message);
                return(null);
            }
        }
        /// <summary>
        ///     Start via related menu-entry
        /// </summary>
        /// <returns>
        ///     <br>Button: If call worked fine</br>
        ///     <br>NULL: If an error occurred</br>
        /// </returns>
        public bool ViaMenu()
        {
            try
            {
                Element element = (new RunLayout()).ViaMenu();
                if (element != null && element.Enabled)
                {
                    // Select container for Envelope Curve -> menu entries
                    element = (new Elements()).MenuElement(HandleFunctions.GetHandle(element));
                    Mouse.MoveTo(element, DefaultValues.locDefaultLocation);

                    Button button = (new Elements()).EntryAll;
                    if (button != null && button.Enabled)
                    {
                        Mouse.MoveTo(button, 500);
                        button.Click(DefaultValues.locDefaultLocation);
                        return(true);
                    }

                    EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Menu entry is not accessable.");
                    return(false);
                }

                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Function is not accessable.");
                return(false);
            }
            catch (Exception exception)
            {
                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), exception.Message);
                return(false);
            }
        }
Exemple #3
0
        /// <summary>
        ///     Start via related menu-entry
        /// </summary>
        /// <returns>
        ///     <br>Button: If call worked fine</br>
        ///     <br>NULL: If an error occurred</br>
        /// </returns>
        public Element ViaMenu()
        {
            try
            {
                MenuItem menuItem = (new Elements()).MenuHelp;
                if (menuItem != null && menuItem.Enabled)
                {
                    Mouse.MoveTo(menuItem, 500);
                    menuItem.Click(DefaultValues.locDefaultLocation);

                    // Select container for Help -> menu entries
                    Element element = (new Elements()).MenuElement(HandleFunctions.GetZeroHandle());
                    Mouse.MoveTo(element, DefaultValues.locDefaultLocation);
                    return(element);
                }

                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Menu is not accessable");
                return(null);
            }
            catch (Exception exception)
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), exception.Message);
                return(null);
            }
        }
Exemple #4
0
        /// <summary>
        ///     Start via related menu-entry
        /// </summary>
        /// <returns>
        ///     <br>Button: If call worked fine</br>
        ///     <br>NULL: If an error occurred</br>
        /// </returns>
        public Element ViaMenu()
        {
            try
            {
                Element element = (new RunDeviceOperation()).ViaMenu();
                if (element != null && element.Enabled)
                {
                    // Select entry Device Function
                    MenuItem menuItem = (new Elements()).EntryDeviceFunction;
                    if (menuItem != null && menuItem.Enabled)
                    {
                        menuItem.Click(DefaultValues.locDefaultLocation);

                        // Select container for Device Operation -> Device Function menu entries
                        element = (new Elements()).MenuElement(HandleFunctions.GetHandle(element));
                        Mouse.MoveTo(element, DefaultValues.locDefaultLocation);
                        return(element);
                    }

                    EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Menu entry is not accessable");
                    return(null);
                }

                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Menu is not accessible");
                return(null);
            }
            catch (Exception exception)
            {
                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), exception.Message);
                return(null);
            }
        }
Exemple #5
0
        /// <summary>
        ///     Start via related menu-entry
        /// </summary>
        /// <returns>
        ///     <br>Element: If call worked fine</br>
        ///     <br>Null: If an error occurred</br>
        /// </returns>
        public Element ViaMenu()
        {
            Ranorex.Delay.Milliseconds(1000 * 10);
            try
            {
                MenuItem menuItem = (new Elements()).MenuFile;
                if (menuItem != null && menuItem.Enabled)
                {
                    menuItem.Click(DefaultValues.locDefaultLocation);

                    // select container for Frame -> File menu entries
                    Element element = (new Elements()).MenuElement(HandleFunctions.GetZeroHandle());
                    Mouse.MoveTo(element, DefaultValues.locDefaultLocation);
                    return(element);
                }

                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Menu is not accessible");
                return(null);
            }
            catch (Exception exception)
            {
                EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), exception.Message);
                return(null);
            }
        }