/// <summary>
        ///
        /// </summary>
        public List <string> Run()
        {
            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Current task: Get event log messages");
            var eventLog       = new Functions.ApplicationArea.Page_Settings.Page_Settings_Functions();
            var statusFunction = new EH.PCPS.TestAutomation.DeviceCare.V10300.Functions.StatusArea.Statusbar.Statusbar_Functions();

            statusFunction.OpenEventLog();
            Delay.Milliseconds(3000);

            //check if event log has entries
            List <Element> children = eventLog.GetChildrenList();

            if (children.Count >= 1)
            {
                if (children.Count == 1)
                {
                    eventLog.LogContainsExactlyOneEvent = true;
                }
                eventLog.PopulateListsWithEventLogMessages();
                eventLog.ConstructEventLog();
            }
            else
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Eventlog is empty. No messages to provide");
                eventLog.EventLogMessages = null;
            }
            return(eventLog.EventLogMessages);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public bool Run()
        {
            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Current task: Register Device Type");
            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Host Application: DeviceCare does not implicitly support registering a device type \r\nA DTM catalog update will be triggered");

            var functions_pageSettings = new Functions.ApplicationArea.Page_Settings.Page_Settings_Functions();
            var functions_pageHome     = new Functions.ApplicationArea.Page_Home.Page_Home_Functions();

            //precondition: home screen is shown
            if (!functions_pageHome.IsHomePageShown())
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Home screen is not shown. Cannot start execution of the task");
                return(false);
            }

            //open settings menu
            functions_pageSettings.OpenSettingsPage();

            if (functions_pageSettings.IsSettingsPageShown())
            {
                //open dtm catalog page
                functions_pageSettings.OpenDTMCatalog();

                if (functions_pageSettings.IsDTMCatalogShown())
                {
                    //press f5 for catalog update
                    Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "DTM catalog update will be triggered...");
                    return(functions_pageSettings.TriggerUpdate());
                }
                else
                {
                    Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "DTM catalog is not shown. Terminating execution");
                    return(false);
                }
            }
            else
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Settings page is not shown. Terminating execution");
                return(false);
            }
        }