Beispiel #1
0
        /// <summary>
        ///     Set focus on combobox DataSet
        /// </summary>
        /// <returns>
        ///     <br>True: If call worked fine</br>
        ///     <br>False: If an error occurred</br>
        /// </returns>
        public bool Run()
        {
            Button button = new ToolbarElements().ButtonParameterSelection;

            if (button != null && button.Enabled)
            {
                Mouse.MoveTo(button, 500);
                button.Click();
                return(true);
            }
            EH.PCPS.TestAutomation.Common.Tools.Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Element is not available.");
            return(false);
        }
Beispiel #2
0
        /// <summary>
        /// Clicks the go to home location button.
        /// </summary>
        /// <returns><c>true</c> if button clicked, <c>false</c> otherwise.</returns>
        public bool Run()
        {
            bool result = true;

            Button homeLocation = new ToolbarElements().HomeButton;

            if (homeLocation == null)
            {
                result = false;
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Go to home location button is null.");
            }
            else
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Clicking go to home location button.");
                homeLocation.Click();
            }

            return(result);
        }
        /// <summary>
        ///     Start help via related toolbar-icon
        /// </summary>
        /// <returns>
        ///     <br>True: If call worked fine</br>
        ///     <br>False: If an error occurred</br>
        /// </returns>
        public bool ViaIcon()
        {
            try
            {
                Button button = new ToolbarElements().ButtonHelp;
                if (button != null && button.Enabled)
                {
                    Mouse.MoveTo(button, 500);
                    button.Click(DefaultValues.locDefaultLocation);
                    return(true);
                }

                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Button is not accessible");
                return(false);
            }
            catch (Exception excException)
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), excException.Message);
                return(false);
            }
        }
        /// <summary>
        ///     Start help via related toolbar-icon
        /// </summary>
        /// <returns>
        ///     <br>True: If call worked fine</br>
        ///     <br>False: If an error occurred</br>
        /// </returns>
        public bool ViaIcon()
        {
            try
            {
                Button button = new ToolbarElements().HelpButton;
                if (button != null && button.Enabled)
                {
                    button.Focus();
                    button.Click(DefaultValues.locDefaultLocation);
                    return(true);
                }

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