Esempio n. 1
0
        public override void Execute()
        {
            StartStep();

            var watch = Stopwatch.StartNew();

            while (LOOP_COUNT > 0)
            {
                //Navigate to Search
                try
                {
                    res = CL.IEX.MilestonesEPG.NavigateByName("STATE:SEARCH");
                    CL.EA.UI.Utils.SendIR("KEY_1");
                    CL.IEX.Wait(5);
                    //CL.EA.UI.Utils.SendIR("RETOUR");
                    LOOP_COUNT--;
                    LogCommentInfo(CL, "Search Navigation Passed for " + LOOP_COUNT.ToString() + "Times");
                }
                catch
                {
                    FAIL_COUNT++;
                    if (FAIL_COUNT > (0.1 * LOOP_COUNT))
                    {
                        watch.Stop();
                        var elapsedMs = watch.ElapsedMilliseconds;


                        FailStep(CL, res, FAIL_COUNT + " times failed to navigate to search. Test ran for " + elapsedMs.ToString() + "MilliSeconds");
                    }

                    LogCommentWarning(CL, "Number of times Search navigation failed: " + FAIL_COUNT);
                }
            }

            PassStep();
        }
Esempio n. 2
0
        public override void Execute()

        {
            StartStep();

            var watch = Stopwatch.StartNew();

            while (LOOP_COUNT > 0)
            {
                //Navigate to Search
                try
                {
                    res = CL.IEX.MilestonesEPG.NavigateByName("STATE:SEARCH");

                    CL.IEX.Wait(2);
                    CL.EA.UI.Utils.SendIR("KEY_1");

                    CL.IEX.Wait(2);
                    CL.EA.UI.Utils.SendIR("SELECT");


                    CL.IEX.Wait(2);
                    CL.EA.UI.Utils.SendIR("SELECT_RIGHT");


                    CL.IEX.Wait(2);
                    string testChannel = string.Empty;

                    while (testChannel != "CHANNEL")
                    {
                        CL.EA.UI.Utils.SendIR("SELECT_DOWN");
                        CL.IEX.Wait(2);
                        res = CL.IEX.MilestonesEPG.GetEPGInfo("title", out testChannel);
                        if (!res.CommandSucceeded)
                        {
                            FailStep(CL, res, "Failed to Get the name");
                        }
                    }

                    CL.EA.UI.Utils.SendIR("SELECT");
                    CL.IEX.Wait(2);

                    CL.EA.UI.Utils.SendIR("SELECT_DOWN");
                    CL.IEX.Wait(2);

                    CL.EA.UI.Utils.SendIR("SELECT");
                    CL.IEX.Wait(2);

                    CL.EA.UI.Utils.SendIR("MENU");
                    CL.IEX.Wait(4);

                    LOOP_COUNT--;

                    LogCommentInfo(CL, "Search Navigation Passed for " + LOOP_COUNT.ToString() + "Times");
                    watch.Stop();
                    var elapsedMs = watch.ElapsedMilliseconds;
                }
                catch
                {
                    FAIL_COUNT++;
                    if (FAIL_COUNT > (0.1 * LOOP_COUNT))
                    {
                        watch.Stop();
                        var elapsedMs = watch.ElapsedMilliseconds;


                        FailStep(CL, res, FAIL_COUNT + " times failed to navigate to search. Test ran for " + elapsedMs.ToString() + "MilliSeconds");
                    }

                    LogCommentWarning(CL, "Number of times Search navigation failed: " + FAIL_COUNT);
                }
            }


            PassStep();
        }
        public override void Execute()
        {
            StartStep();

            var watch = Stopwatch.StartNew();

            while (LOOP_COUNT > 0)
            {
                //Navigate to Search
                try
                {
                    string[] diffOptions = (CL.EA.GetValueFromINI(EnumINIFile.Test, "TEST PARAMS", "DEFF_OPTIONS")).Split(',');

                    foreach (string opt in diffOptions)
                    {
                        res = CL.IEX.MilestonesEPG.NavigateByName("STATE:SEARCH");
                        CL.IEX.Wait(2);

                        CL.EA.UI.Utils.SendIR("KEY_1");
                        CL.IEX.Wait(2);

                        CL.EA.UI.Utils.SendIR("SELECT_DOWN");
                        CL.IEX.Wait(2);

                        CL.EA.UI.Utils.SendIR("SELECT");
                        CL.IEX.Wait(2);

                        CL.EA.UI.Utils.SendIR("SELECT_RIGHT");
                        CL.IEX.Wait(2);
                        string options = "RESET KEYWORD";
                        while (options != opt)
                        {
                            CL.EA.UI.Utils.SendIR("SELECT_DOWN");
                            CL.IEX.Wait(2);

                            res = CL.IEX.MilestonesEPG.GetEPGInfo("title", out options);
                            if (!res.CommandSucceeded)
                            {
                                FailStep(CL, res, "Failed to Get the " + opt);
                            }
                        }
                        CL.EA.UI.Utils.SendIR("SELECT");
                        CL.IEX.Wait(2);

                        CL.EA.UI.Utils.SendIR("MENU");
                        CL.IEX.Wait(2);
                    }

                    LOOP_COUNT--;

                    LogCommentInfo(CL, "Search Navigation Passed for " + LOOP_COUNT.ToString() + "Times");
                    watch.Stop();
                    var elapsedMs = watch.ElapsedMilliseconds;
                }
                catch
                {
                    FAIL_COUNT++;
                    if (FAIL_COUNT > (0.1 * LOOP_COUNT))
                    {
                        watch.Stop();
                        var elapsedMs = watch.ElapsedMilliseconds;


                        FailStep(CL, res, FAIL_COUNT + " times failed to navigate to search. Test ran for " + elapsedMs.ToString() + "MilliSeconds");
                    }

                    LogCommentWarning(CL, "Number of times Search navigation failed: " + FAIL_COUNT);
                }
            }


            PassStep();
        }