Esempio n. 1
0
        public static bool Run(int expectedMaximumNumberOfEvents)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = Execution.RunSelectTab.Run(0);

            isPassed &= AssertFunctions.LessOrEqual(expectedMaximumNumberOfEvents, Execution.Table.GetNumberOfEvents(), "Checking whether the number of events is less than or equal to: " + expectedMaximumNumberOfEvents);

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckMaximumNumberOfEvents passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckMaximumNumberOfEvents failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 2
0
        public static bool Run(string pathToDehFile, string pathToOtherDehFile, int timeUntilCancelingInMilliseconds)
        {
            StartUp();

            bool isPassed = Flows.SelectMode.Run(3);

            isPassed &= Flows.LoadDataset1.Run(pathToDehFile);
            isPassed &= Flows.LoadDataset2.Run(pathToOtherDehFile);
            isPassed &= Flows.CancelCompare.Run(timeUntilCancelingInMilliseconds);

            Execution.TakeScreenshotOfModule.Run();
            isPassed &= AssertFunctions.AreEqual(string.Empty, CommonFlows.GetCriticalError.Run()[0], "Checking that there is no critical error.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CancelCompareDehWithDeh passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CancelCompareDehWithDeh failed.");
                Log.Screenshot();
            }

            TearDown();

            return(isPassed);
        }
Esempio n. 3
0
        public static bool Run()
        {
            StartUp();

            bool isPassed = Flows.SelectMode.Run(3); // .deh vs .deh

            isPassed &= Flows.LoadDataset1.Run();
            isPassed &= Flows.LoadDataset2.Run();
            isPassed &= Flows.Compare.Run(600000);

            isPassed &= AssertFunctions.AreEqual(string.Empty, CommonFlows.GetCriticalError.Run()[0], "Checking that there is no critical error.");

            // TODO: Validate comparison result
            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareDehFileWithDehFile passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareDehFileWithDehFile failed.");
                Log.Screenshot();
            }

            TearDown();

            return(isPassed);
        }
Esempio n. 4
0
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            string expectedCoefficients = "";
            string tableValues          = "";
            //Referenzwerte kommen von Jochen oder Manuel von PC-F

            bool isPassed = Execution.Container.SelectTabBaseSettings();

            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Fine tuning settings", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= Execution.Container.SelectTabLiquidProperties();
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid properties tab is active.");
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(tableValues));
            isPassed &= AssertFunctions.AreEqual(true, DeviceFunctionLoader.CoDIA.ConcentrationV2.Functions.MenuArea.Toolbar.Validation.IsCalculationButtonEnabled.Run(), "Verifies that calculate button is enabled.");
            isPassed &= Execution.CoefficientsOverview.CompareCoefficients("0.01", StringToStringArrayConverter.Run(expectedCoefficients));

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_EnterDataForFineTuning passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_EnterDataForFineTuning failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run(string pathToSilWhgParameter)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = Execution.SilWhgFunctions.NavigateToSilWhgWizard(pathToSilWhgParameter);

            isPassed &= Validation.SilWhg.WaitUntilSilSequenceStartPageIsShown(15000);
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsSilSequenceStartPageShown(), "Determining whether SIL sequence start page is shown.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is inactive.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsNextButtonActive(), "Determining whether Next button is inactive.");
            isPassed &= AssertFunctions.AreEqual("Valid", Execution.Application.GetParameter("Set write protection:").ParameterState.ToString(), "Determining whether Set write protection: text field is available.");
            Execution.TakeScreenshotOfModule.OnlineParameterization();
            isPassed &= DeviceFunctionLoader.CoDIA.Parameterization.Functions.MenuArea.Toolbar.Execution.GoToHomeLocation.Run();
            isPassed &= Validation.SilWhg.WaitUntilSilSequenceStartPageIsDisappeared(15000);
            Execution.TakeScreenshotOfModule.OnlineParameterization();

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_ReturnToHomeFromSilSequence passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_ReturnToHomeFromSilSequence failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 6
0
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = AssertFunctions.AreEqual(false, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid Properties tab is not active.");

            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsBaseSettingsTabPageAvailable(), "Verify that Base settings tab is active.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsCoefficientOverviewTabPageAvailable(), "Verify that Coefficient Overview tab is active.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsExpertResultsTabPageAvailable(), "Verify that Expert Results tab is active.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckTabPageAvailabilityDefault passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckTabPageAvailabilityDefault failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        /// <summary>
        /// Selects tank type 'Modular tank' and configures its parameter if needed. Use empty strings if you do not want to configure a parameter.
        /// </summary>
        /// <param name="height">
        /// The height.
        /// </param>
        /// <param name="view">
        /// The view.
        /// </param>
        /// <returns>
        /// <c>true</c> if configuration was successful, <c>false</c> otherwise.
        /// </returns>
        public bool Run(string height, string view)
        {
            bool result = Execution.SelectTab.Run(1);

            result &= Execution.SetTankType.Run("Modular tank");
            if (height != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetModularTankHeight(height);
                result &= AssertFunctions.AreEqual(height, Execution.ConfigureTankParameter.GetModularTankHeight(), "Checking whether the height has been set correctly.");
            }

            if (view != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetModularTankView(view);
                result &= AssertFunctions.AreEqual(view, Execution.ConfigureTankParameter.GetModularTankView(), "Checking whether the view has been set correctly.");
            }

            if (result)
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Configuring finished successfully.");
            }
            else
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "An error occurred during configuring.");
            }

            return(result);
        }
        public static bool Run(string fileName)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */

            bool isPassed = DeviceFunctionLoader.CoDIA.Viscosity.Flows.Import.Run(fileName);

            isPassed &= AssertFunctions.AreEqual(string.Empty, CommonFlows.GetCriticalError.Run()[0], "Checking that there is no critical error.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_Import passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_Import failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 9
0
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = Flows.Read.Run();

            Execution.TakeScreenshotOfModule.Run();
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.AreReadCoefficientsAvailable();
            isPassed &= AssertFunctions.AreEqual(string.Empty, CommonFlows.GetCriticalError.Run()[0], "Checking that there is no critical error.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_ReadCoefficientsFromDevice passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_ReadCoefficientsFromDevice failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        /// <summary>
        /// Selects tank type 'Spherical tank' and configures its parameter if needed. Use empty strings if you do not want to configure a parameter.
        /// </summary>
        /// <param name="height">
        /// The height.
        /// </param>
        /// <param name="diameter">
        /// The diameter.
        /// </param>
        /// <returns>
        /// <c>true</c> if configuration was successful, <c>false</c> otherwise.
        /// </returns>
        public bool Run(string height, string diameter)
        {
            bool result = Execution.SelectTab.Run(1);

            result &= Execution.SetTankType.Run("Spherical tank");
            if (this.IsValid(height))
            {
                result &= Execution.ConfigureTankParameter.SetSphericalTankHeight(height);
                result &= AssertFunctions.AreEqual(height, Execution.ConfigureTankParameter.GetSphericalTankHeight(), "Checking whether the height has been set correctly.");
            }

            if (this.IsValid(diameter))
            {
                result &= Execution.ConfigureTankParameter.SetSphericalTankDiameter(diameter);
                result &= AssertFunctions.AreEqual(diameter, Execution.ConfigureTankParameter.GetSphericalTankDiameter(), "Checking whether the diameter has been set correctly.");
            }

            if (result)
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Configuring finished successfully.");
            }
            else
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "An error occurred during configuring.");
            }

            return(result);
        }
        public static bool Run()
        {
            StartUp();

            bool isPassed = Flows.SelectMode.Run(1);

            isPassed &= Flows.LoadDataset2.Run();
            isPassed &= Flows.CancelCompare.Run(2000);

            Execution.TakeScreenshotOfModule.Run();
            isPassed &= AssertFunctions.AreEqual(string.Empty, CommonFlows.GetCriticalError.Run()[0], "Checking that there is no critical error.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CancelCompareOfflineWithDehFile passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CancelCompareOfflineWithDehFile failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 12
0
        /// <summary>
        /// The execute shared functions.
        /// </summary>
        /// <param name="comparingAccuracy">
        /// The comparing accuracy.
        /// </param>
        /// <param name="expectedCoefficients">
        /// The expected coefficients.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        private static bool ExecuteSharedFunctions(string comparingAccuracy, string expectedCoefficients)
        {
            bool isPassed;

            isPassed  = Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= AssertFunctions.AreEqual(true, Execution.CoefficientsOverview.AreCalculatedCoefficientsAvailable(), AssertMessage);
            isPassed &= AssertFunctions.AreEqual(true, Execution.CoefficientsOverview.CompareCoefficients(comparingAccuracy, StringToStringArrayConverter.Run(expectedCoefficients)), "Verify that coefficients have been loaded correctly.");
            isPassed &= Execution.Container.SelectTabExpertResults();
            Execution.TakeScreenshotOfModule.Run();
            return(isPassed);
        }
        public static bool Run(string pathToSilWhgParameter, string silWhgCode, int timeoutForCanceling, int timeoutForNextButton)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = Execution.SilWhgFunctions.NavigateToSilWhgWizard(pathToSilWhgParameter);

            isPassed &= Validation.SilWhg.WaitUntilSilSequenceStartPageIsShown(timeoutForCanceling);
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsSilSequenceStartPageShown(), "Determining whether SIL sequence start page is shown.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is inactive.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsNextButtonActive(), "Determining whether Next button is inactive.");
            isPassed &= AssertFunctions.AreEqual("Valid", Execution.Application.GetParameter("Set write protection:").ParameterState.ToString(), "Determining whether Set write protection: text field is available.");
            Execution.TakeScreenshotOfModule.OnlineParameterization();

            isPassed &= Execution.SilWhgFunctions.SetSilWhgParameter("Set write protection:", silWhgCode);
            isPassed &= Validation.SilWhg.WaitUntilNextButtonIsActive(timeoutForNextButton);
            isPassed &= Execution.SilWhgFunctions.Next();

            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsNavigationTreeShown(), "Determining whether Navigation tree is not visible any longer.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is active.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsNextButtonActive(), "Determining whether Next button is inactive.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsPreviousButtonActive(), "Determining whether Previous button is active.");
            Execution.TakeScreenshotOfModule.OnlineParameterization();

            isPassed &= Execution.SilWhgFunctions.SetSilWhgParameter("Commissioning:", "Expert mode");
            isPassed &= Validation.SilWhg.WaitUntilNextButtonIsActive(timeoutForNextButton);
            isPassed &= Execution.SilWhgFunctions.Next();

            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is active.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsPreviousButtonActive(), "Determining whether Previous button is active.");

            isPassed &= Execution.SilWhgFunctions.Cancel();
            isPassed &= Validation.SilWhg.WaitUntilCancelingIsFinished(timeoutForCanceling);
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsSilSequenceStartPageShown(), "Determining whether SIL sequence start page is shown.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsNavigationTreeShown(), "Determining whether Navigation tree is visible again.");
            Execution.TakeScreenshotOfModule.OnlineParameterization();

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CancelSilSequence passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CancelSilSequence failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 14
0
        /// <summary>
        /// Opens the tab Settings and configures the General Settings parameter. Use string.empty if you want to skip a parameter.
        /// </summary>
        /// <param name="linearizationType">The linearization type.</param>
        /// <param name="emptyCalibration">The empty calibration.</param>
        /// <param name="fullCalibration">The full calibration.</param>
        /// <param name="distanceUnit">The distance unit.</param>
        /// <param name="levelUnit">The level unit.</param>
        /// <returns><c>true</c> if configuration successful, <c>false</c> otherwise.</returns>
        public bool Run(string linearizationType, string emptyCalibration, string fullCalibration, string distanceUnit, string levelUnit)
        {
            bool result  = Execution.SelectTab.Run(2);
            var  pattern = new Regex(@"\W");

            if (linearizationType != string.Empty)
            {
                result &= Execution.ConfigureSettingsTab.SetGeneralSettingsLinearizationType(linearizationType);
                string testValue      = pattern.Replace(linearizationType, string.Empty);
                string referenceValue = pattern.Replace(Execution.ConfigureSettingsTab.GetGeneralSettingsLinearizationType(), string.Empty);
                result &= AssertFunctions.AreEqual(testValue, referenceValue, "Checking whether the linearizationType has been set correctly.");
            }

            if (emptyCalibration != string.Empty)
            {
                result &= Execution.ConfigureSettingsTab.SetGeneralSettingsEmptyCalibration(emptyCalibration);
                result &= AssertFunctions.AreEqual(emptyCalibration, Execution.ConfigureSettingsTab.GetGeneralSettingsEmptyCalibration(), "Checking whether the empty calibration has been set correctly.");
            }

            if (fullCalibration != string.Empty)
            {
                result &= Execution.ConfigureSettingsTab.SetGeneralSettingsFullCalibration(fullCalibration);
                result &= AssertFunctions.AreEqual(fullCalibration, Execution.ConfigureSettingsTab.GetGeneralSettingsFullCalibration(), "Checking whether the full calibration has been set correctly.");
            }

            if (distanceUnit != string.Empty)
            {
                result &= Execution.ConfigureSettingsTab.SetGeneralSettingsDistanceUnit(distanceUnit);
                result &= AssertFunctions.AreEqual(distanceUnit, Execution.ConfigureSettingsTab.GetGeneralSettingsDistanceUnit(), "Checking whether the distanceUnit has been set correctly.");
            }

            if (levelUnit != string.Empty)
            {
                result &= Execution.ConfigureSettingsTab.SetGeneralSettingsLevelUnit(levelUnit);
                result &= AssertFunctions.AreEqual(levelUnit, Execution.ConfigureSettingsTab.GetGeneralSettingsLevelUnit(), "Checking whether the levelUnit has been set correctly.");
            }

            if (result)
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Configuring settings finished successfully.");
            }
            else
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "An error occurred. Configuration was not successful.");
            }

            return(result);
        }
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */

            // Dummy-Values um Änderungen in der Berechnung festzustellen
            string expectedCoefficients = "-0.0533;-1.3581;3.4876;-2.0645;0.3985;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000";
            string tableValues          = "5;-10;0.5;10;0;0.6;15;10;0.7;20;20;0.8;25;30;0.9;30;40;1;35;50;1.1;40;60;1.2;45;70;1.3;50;75;1.4;55;80;1.5;60;85;1.6;65;90;1.7;70;95;1.8";

            // TODO:
            // Referenzwerte kommen von Jochen oder Manuel von PC-F
            bool isPassed = true; // = Execution.Container.SelectTabBaseSettings();

            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Liquid properties", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid properties tab is active.");
            isPassed &= Execution.Container.SelectTabLiquidProperties();
            Execution.LiquidProperties.InputFormat = "List";
            Execution.TakeScreenshotOfModule.Run();
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(tableValues));
            isPassed &= Execution.LiquidProperties.Recalculate();
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.CompareCoefficients("0.01", StringToStringArrayConverter.Run(expectedCoefficients));
            isPassed &= Execution.Container.SelectTabLiquidProperties();

            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Please have a look at the screenshot to verify Concentration Table Validity");
            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CalculateCoefficients passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CalculateCoefficients failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        /// <summary>
        /// Opens the tab Settings and configures the User Settings parameter.
        /// </summary>
        /// <param name="unitAfterLinearization">The unit after linearization.</param>
        /// <returns><c>true</c> if configuration successful, <c>false</c> otherwise.</returns>
        public bool Run(string unitAfterLinearization)
        {
            bool result = Execution.SelectTab.Run(2);

            if (this.IsValid(unitAfterLinearization))
            {
                result &= Execution.ConfigureSettingsTab.SetUserSettingsUnitAfterLinearization(unitAfterLinearization);
                result &= AssertFunctions.AreEqual(unitAfterLinearization, Execution.ConfigureSettingsTab.GetUserSettingsUnitAfterLinearization(), "Checking whether the unitAfterLinearization has been set correctly.");
            }

            if (result)
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Configuring user settings finished successfully.");
            }
            else
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "An error occurred. Configuration was not successful.");
            }

            return(result);
        }
Esempio n. 17
0
        public static bool Run(int row, int column, string referenceValue)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = AssertFunctions.AreEqual(referenceValue, Execution.GetValuesFromTable.SingleValue(row, column), "Checking whether table value matches reference value.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareTableValue passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareTableValue failed.");
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 18
0
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = AssertFunctions.AreNotEqual("Failure", Execution.GetNamurStatusFromHeader.Run(), "Checking that device has no failure.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckThatDeviceHasNoFailure passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckThatDeviceHasNoFailure failed.");
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run(string value)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = AssertFunctions.AreEqual(true, Execution.Information.CheckIfInfoContains(value), "Checking whether the Historom module info message contains a specified string.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckHistoromInfoMessage passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckHistoromInfoMessage failed.");
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run(string pathToParameter, bool shouldExist)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool result   = Validation.IsParameterExisting.Run(pathToParameter);
            bool isPassed = AssertFunctions.AreEqual(shouldExist, result, string.Format("Verify expectation ({0}) for existence of parameter {2} and result ({1}).", shouldExist, result, pathToParameter));

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_IsParameterExisting passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_IsParameterExisting failed.");
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = AssertFunctions.AreEqual(true, Validation.IsCalculateButtonInactive.Run(), "Button 'Calculate should be inactive'.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_IsCalculateButtonInactive passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_IsCalculateButtonInactive failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = AssertFunctions.AreEqual(false, Validation.CheckAvailabilityOfTabPages.IsReferenceValuesTabPageAvailable(), "Verify that Reference Values tab is inactive.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckThatAllFieldsInBaseSettingsAreGrayed passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckThatAllFieldsInBaseSettingsAreGrayed failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 23
0
        public static bool Run(string expectedNamurStatus)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = AssertFunctions.AreEqual(expectedNamurStatus, Execution.GetNamurStatusFromHeader.Run(), "Comparing the actual Namur-Status to a reference status.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckNamurStatus passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckNamurStatus failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Esempio n. 24
0
        public static bool Run(int timeoutForComparisonInMilliseconds)
        {
            StartUp();

            bool isPassed = Flows.SelectMode.Run(0); // Offline vs Online

            isPassed &= Flows.Compare.Run(timeoutForComparisonInMilliseconds);

            isPassed &= AssertFunctions.AreEqual(string.Empty, CommonFlows.GetCriticalError.Run()[0], "Checking that there is no critical error.");

            // TODO: Validate comparison result
            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareOfflineWithOnline passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareOfflineWithOnline failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        /// <summary>
        /// Selects tank type 'Horizontal cylindrical tank' and configures its parameter if needed. Use empty strings if you do not want to configure a parameter.
        /// </summary>
        /// <param name="height">
        /// The height.
        /// </param>
        /// <param name="diameter">
        /// The diameter.
        /// </param>
        /// <param name="length">
        /// The length.
        /// </param>
        /// <param name="angle">
        /// The angle.
        /// </param>
        /// <param name="endTypeRight">
        /// The end Type Right.
        /// </param>
        /// <param name="endTypeLeft">
        /// The end Type Left.
        /// </param>
        /// <param name="wallThickness">
        /// The wall Thickness.
        /// </param>
        /// <param name="changePosition">
        /// The change Position.
        /// </param>
        /// <returns>
        /// <c>true</c> if configuration was successful, <c>false</c> otherwise.
        /// </returns>
        public bool Run(string height, string diameter, string length, string angle, string endTypeRight, string endTypeLeft, string wallThickness, string changePosition)
        {
            bool result = Execution.SelectTab.Run(1);

            result &= Execution.SetTankType.Run("Horizontal cylindrical tank");
            if (height != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankHeight(height);
                result &= AssertFunctions.AreEqual(height, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankHeight(), "Checking whether the height has been set correctly.");
            }

            if (diameter != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankDiameter(diameter);
                result &= AssertFunctions.AreEqual(diameter, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankDiameter(), "Checking whether the diameter has been set correctly.");
            }

            if (length != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankLength(length);
                result &= AssertFunctions.AreEqual(length, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankLength(), "Checking whether the length has been set correctly.");
            }

            if (angle != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankAngle(angle);
                result &= AssertFunctions.AreEqual(angle, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankAngle(), "Checking whether the angle has been set correctly.");
            }

            if (endTypeRight != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankEndTypeRight(endTypeRight);
                result &= AssertFunctions.AreEqual(endTypeRight, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankEndTypeRight(), "Checking whether the endTypeRight has been set correctly.");
            }

            if (endTypeLeft != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankEndTypeLeft(endTypeLeft);
                result &= AssertFunctions.AreEqual(endTypeLeft, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankEndTypeLeft(), "Checking whether the endTypeLeft has been set correctly.");
            }

            if (wallThickness != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankWallThickness(wallThickness);
                result &= AssertFunctions.AreEqual(wallThickness, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankWallThickness(), "Checking whether the wallThickness has been set correctly.");
            }

            if (changePosition != string.Empty)
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankChangePosition(changePosition);
                result &= AssertFunctions.AreEqual(changePosition, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankChangePosition(), "Checking whether the changePosition has been set correctly.");
            }

            if (result)
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Configuring finished successfully.");
            }
            else
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "An error occurred during configuring.");
            }

            return(result);
        }
        public static bool Run()
        {
            // TC_CheckFineTuningGuiBehaviour
            // Set Calculation Base to Fine Tuning
            // Read Coefficients from Device
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check Coefficients from Device for != nan
            // Select Tab Liquid Properties
            //  Check control Recalculate for enabled state = false
            // Enter values into table
            //  Check control Recalculate for enabled state = true
            // Recalculate Coefficients
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check calculated Coefficients for != nan
            const string Description = "Description of TC_CheckFineTuningGuiBehaviour: \r\n " +
                                       "-------------------------------------------------- \r\n " +
                                       "- Set Calculation Base to Fine Tuning \r\n " +
                                       "- Read Coefficients from Device \r\n " +
                                       "-> Check user notification for success \r\n " +
                                       "- Select Tab Coefficients Overview \r\n " +
                                       "-> Check Coefficients from Device for != nan \r\n " +
                                       "- Select Tab Liquid Properties \r\n " +
                                       "->  Check control Recalculate for enabled state = false \r\n " +
                                       "- Enter values into table \r\n " +
                                       "->  Check control Recalculate for enabled state = true \r\n " +
                                       "- Recalculate Coefficients \r\n " +
                                       "->  Check user notification for success \r\n " +
                                       "- Select Tab Coefficients Overview \r\n " +
                                       "->  Check calculated Coefficients for != nan \r\n ";

            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), Description);

            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */

            // TC_CheckFineTuningGuiBehaviour
            // Set Calculation Base to Fine Tuning
            // Read Coefficients from Device
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check Coefficients from Device for != nan
            // Select Tab Liquid Properties
            //  Check control Recalculate for enabled state = false
            // Enter values into table
            //  Check control Recalculate for enabled state = true
            // Recalculate Coefficients
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check calculated Coefficients for != nan
            const string TableValues = "1;1;1;2;2;2;3;3;3;4;4;4;5;5;5;6;6;6;7;7;7;8;8;8;9;9;9;10;10;10;11;11;11;12;12;12";

            bool isPassed = false;

            isPassed  = AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsBaseSettingsTabPageAvailable(), "Verify that Base Settings tab is active.");
            isPassed &= Execution.Container.SelectTabBaseSettings();
            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Fine tuning settings", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= Flows.Read.Run();

            // Todo:
            // isPassed &= Check user notification for success
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsCoefficientOverviewTabPageAvailable(), "Verify that Coefficients Overview tab is active.");
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.AreReadCoefficientsAvailable();
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid Properties tab is active.");
            isPassed &= Execution.Container.SelectTabLiquidProperties();

            // Todo:
            // Check control Recalculate for enabled state = false
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(TableValues));

            // Todo:
            // Check control Recalculate for enabled state = true
            isPassed &= Execution.LiquidProperties.Recalculate();

            // Todo:
            // Check user notification for success
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsCoefficientOverviewTabPageAvailable(), "Verify that Coefficients Overview tab is active.");
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.AreCalculatedCoefficientsAvailable();

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckFineTuningGuiBehaviour passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckFineTuningGuiBehaviour failed.");
                Log.Screenshot();
            }

            TearDown();

            return(isPassed);
        }
        public static bool Run()
        {
            // TC_CheckReferenceValueTabBehaviour
            // Select Tab Base settings
            //  Check Tab Reference Values for enabled state = false
            // Set Liquid Type to %mass%volume
            //  Check Tab Reference Values for enabled state = true
            // Select Tab Reference Values
            //  Check controls for read only state = true
            //  Check controls for enabled state = true
            // Select Tab Base settings
            // Set Liquid Type to non %mass%volume
            //  Check Tab Reference Values for enabled state = false
            const string Description = "Description of TC_CheckReferenceValueTabBehaviour: \r\n " +
                                       "-------------------------------------------------- \r\n " +
                                       "- Select Tab Base settings \r\n " +
                                       "-> Check Tab Reference Values for enabled state = false \r\n " +
                                       "- Set Liquid Type to %mass%volume \r\n " +
                                       "-> Check Tab Reference Values for enabled state = true \r\n " +
                                       "- Select Tab Reference Values \r\n " +
                                       "-> Check controls for read only state = true \r\n " +
                                       "-> Check controls for enabled state = true \r\n " +
                                       "- Select Tab Base settings \r\n " +
                                       "- Set Liquid Type to non %mass%volume \r\n " +
                                       "-> Check Tab Reference Values for enabled state = false";

            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), Description);

            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */

            bool isPassed = false;

            isPassed  = Execution.Container.SelectTabBaseSettings();
            isPassed &= AssertFunctions.AreEqual(false, Validation.CheckAvailabilityOfTabPages.IsReferenceValuesTabPageAvailable(), "Verify that Reference Values tab is inactive.");
            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Predefined liquid", "%mass / %volume", string.Empty, string.Empty, string.Empty);
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsReferenceValuesTabPageAvailable(), "Verify that Reference Values tab is active.");
            isPassed &= Execution.Container.SelectTabReferenceValues();

            // Todo:
            // isPassed &= Check controls for read only state = true
            // isPassed &= Check controls for enabled state = true
            isPassed &= Execution.Container.SelectTabBaseSettings();
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsBaseSettingsTabPageAvailable(), "Verify that Base Settings tab is active.");
            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration(string.Empty, "Glucose in water", string.Empty, string.Empty, string.Empty);
            isPassed &= AssertFunctions.AreEqual(false, Validation.CheckAvailabilityOfTabPages.IsReferenceValuesTabPageAvailable(), "Verify that Reference Values tab is inactive.");

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckReferenceValueTabBehaviour passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckReferenceValueTabBehaviour failed.");
                Log.Screenshot();
            }

            TearDown();

            return(isPassed);
        }
        /// <summary>
        /// Goes through a SIL/WHG sequence and locks the device. Unlocks it afterwards. The user can specify parameter for which the locking state will be checked during the test.
        /// </summary>
        /// <param name="pathToSilWhgParameter">
        /// The path to the SIL/WHG parameter. E.g.: Levelflex FMP5x//Setup//Advanced setup//SIL/WHG confirmation.
        /// </param>
        /// <param name="silWhgCode">
        /// The code for SIL/WHG.
        /// </param>
        /// <param name="pathToDeactivateSilWhg">
        /// The path To Deactivate Sil Whg. E.g.: Levelflex FMP5x//Setup//Advanced setup//Deactivate SIL/WHG.
        /// </param>
        /// <param name="pathToParameter">
        /// A list with paths to parameter for which the locking state during the SIL WHG test will be checked. A path looks like this: Levelflex FMP5x//Setup//Full calibration (4).
        /// </param>
        /// <param name="timeoutForSilWhgPageToDisappear">
        /// The timeout for SIL/WHG page to disappear after the SIL/WHG sequence is left or finished.
        /// </param>
        /// <param name="timeoutForNextButton">
        /// The timeout in milliseconds for the next button to become active after a parameter has been set. This can take some time. Recommended: 15000 milliseconds.
        /// </param>
        /// <returns>
        /// Returns true if test case is passed, false otherwise.
        /// </returns>
        public static bool Run(string pathToSilWhgParameter, string silWhgCode, string pathToDeactivateSilWhg, List <string> pathToParameter, int timeoutForSilWhgPageToDisappear, int timeoutForNextButton)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = Execution.SilWhgFunctions.NavigateToSilWhgWizard(pathToSilWhgParameter);

            isPassed &= Validation.SilWhg.WaitUntilSilSequenceStartPageIsShown(timeoutForSilWhgPageToDisappear);
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsSilSequenceStartPageShown(), "Determining whether SIL/WHG sequence start page is shown.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is inactive.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsNextButtonActive(), "Determining whether Next button is inactive.");
            isPassed &= AssertFunctions.AreEqual("Valid", Execution.Application.GetParameter("Set write protection:").ParameterState.ToString(), "Determining whether Set write protection: text field is available.");
            Execution.TakeScreenshotOfModule.OnlineParameterization();

            isPassed &= Execution.SilWhgFunctions.SetSilWhgParameter("Set write protection:", silWhgCode);
            isPassed &= Validation.SilWhg.WaitUntilNextButtonIsActive(15000);
            isPassed &= Execution.SilWhgFunctions.Next();

            Execution.TakeScreenshotOfModule.OnlineParameterization();
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is active.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsNextButtonActive(), "Determining whether Next button is inactive.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsPreviousButtonActive(), "Determining whether Previous button is active.");

            isPassed &= Execution.SilWhgFunctions.SetSilWhgParameter("Commissioning:", "Expert mode");
            isPassed &= Validation.SilWhg.WaitUntilNextButtonIsActive(15000);
            isPassed &= Execution.SilWhgFunctions.Next();

            isPassed &= Validation.SilWhg.WaitUntilNextButtonIsActive(15000);
            isPassed &= Execution.SilWhgFunctions.Next();
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is active.");
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsNextButtonActive(), "Determining whether Next button is inactive.");
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsPreviousButtonActive(), "Determining whether Previous button is active.");

            isPassed &= Execution.SilWhgFunctions.SetSilWhgParameter("Confirm function test:", "Yes");
            isPassed &= Validation.SilWhg.WaitUntilNextButtonIsActive(15000);
            isPassed &= Execution.SilWhgFunctions.Next();

            isPassed &= Execution.SilWhgFunctions.SetSilWhgParameter("Set write protection:", silWhgCode);
            Execution.TakeScreenshotOfModule.OnlineParameterization();
            isPassed &= Validation.SilWhg.WaitUntilSilSequenceStartPageIsDisappeared(timeoutForSilWhgPageToDisappear);
            isPassed &= Flows.CheckParameterLockingState.Run(pathToParameter, true);

            isPassed &= Execution.SilWhgFunctions.NavigateToSilWhgWizard(pathToDeactivateSilWhg);
            isPassed &= Validation.SilWhg.WaitUntilResetSilSequenceStartPageIsShown(timeoutForSilWhgPageToDisappear);
            isPassed &= AssertFunctions.AreEqual(true, Validation.SilWhg.IsResetSilSequenceStartPageShown(), "Determining whether SIL/WHG sequence start page is shown.");
            isPassed &= AssertFunctions.AreEqual("Valid", Execution.Application.GetParameter("Reset write protection:").ParameterState.ToString(), "Determining whether reset write protection: text field is available.");
            Execution.TakeScreenshotOfModule.OnlineParameterization();
            isPassed &= AssertFunctions.AreEqual(false, Validation.SilWhg.IsCancelButtonActive(), "Determining whether Cancel button is inactive.");
            isPassed &= Execution.SilWhgFunctions.SetSilWhgParameter("Reset write protection:", silWhgCode);
            isPassed &= Validation.SilWhg.WaitUntilResetSilSequenceStartPageIsDisappeared(timeoutForSilWhgPageToDisappear);
            Execution.TakeScreenshotOfModule.OnlineParameterization();

            Flows.CheckParameterLockingState.Run(pathToParameter, false);

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_LockWhgAndCheckParameter passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_LockWhgAndCheckParameter failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        /// <summary>
        /// Selects tank type 'cylindrical tank standing' and configures its parameter if needed. Use empty strings if you do not want to configure a parameter.
        /// </summary>
        /// <param name="height">
        /// The height.
        /// </param>
        /// <param name="diameter">
        /// The diameter.
        /// </param>
        /// <param name="length">
        /// The length.
        /// </param>
        /// <param name="ceilingType">
        /// The ceiling Type.
        /// </param>
        /// <param name="bottomType">
        /// The bottom Type.
        /// </param>
        /// <param name="wallThickness">
        /// The wall Thickness.
        /// </param>
        /// <param name="ceilingHeight">
        /// The ceiling Height.
        /// </param>
        /// <param name="ceilingWidth">
        /// The ceiling Width.
        /// </param>
        /// <param name="bottomHeight">
        /// The bottom Height.
        /// </param>
        /// <param name="bottomWidth">
        /// The bottom Width.
        /// </param>
        /// <returns>
        /// <c>true</c> if configuration was successful, <c>false</c> otherwise.
        /// </returns>
        public bool Run(string height, string diameter, string length, string ceilingType, string bottomType, string wallThickness, string ceilingHeight, string ceilingWidth, string bottomHeight, string bottomWidth)
        {
            bool result = Execution.SelectTab.Run(1);

            result &= Execution.SetTankType.Run("Cylindrical tank standing");
            if (this.IsValid(height))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingHeight(height);
                result &= AssertFunctions.AreEqual(height, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingHeight(), "Checking whether the height has been set correctly.");
            }

            if (this.IsValid(diameter))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingInternalDiameter(diameter);
                result &= AssertFunctions.AreEqual(diameter, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingInternalDiameter(), "Checking whether the diameter has been set correctly.");
            }

            if (this.IsValid(length))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingLength(length);
                result &= AssertFunctions.AreEqual(length, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingLength(), "Checking whether the length has been set correctly.");
            }

            if (this.IsValid(ceilingType))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingCeilingType(ceilingType);
                result &= AssertFunctions.AreEqual(ceilingType, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingCeilingType(), "Checking whether the ceilingType has been set correctly.");
            }

            if (this.IsValid(bottomType))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingBottomType(bottomType);
                result &= AssertFunctions.AreEqual(bottomType, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingBottomType(), "Checking whether the bottomType has been set correctly.");
            }

            if (this.IsValid(wallThickness))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingWallThickness(wallThickness);
                result &= AssertFunctions.AreEqual(wallThickness, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingWallThickness(), "Checking whether the wallThickness has been set correctly.");
            }

            if (this.IsValid(ceilingHeight))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingCeilingHeight(ceilingHeight);
                result &= AssertFunctions.AreEqual(ceilingHeight, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingCeilingHeight(), "Checking whether the ceilingHeight has been set correctly.");
            }

            if (this.IsValid(ceilingWidth))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingCeilingWidth(ceilingWidth);
                result &= AssertFunctions.AreEqual(ceilingWidth, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingCeilingWidth(), "Checking whether the ceilingWidth has been set correctly.");
            }

            if (this.IsValid(bottomHeight))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingBottomHeight(bottomHeight);
                result &= AssertFunctions.AreEqual(bottomHeight, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingBottomHeight(), "Checking whether the bottomHeight has been set correctly.");
            }

            if (this.IsValid(bottomWidth))
            {
                result &= Execution.ConfigureTankParameter.SetHorizontalCylindricalTankStandingBottomWidth(bottomWidth);
                result &= AssertFunctions.AreEqual(bottomWidth, Execution.ConfigureTankParameter.GetHorizontalCylindricalTankStandingBottomWidth(), "Checking whether the bottomWidth has been set correctly.");
            }

            if (result)
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Configuring finished successfully.");
            }
            else
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "An error occurred during configuring.");
            }

            return(result);
        }