コード例 #1
0
 public static bool ClickThis(this Ranorex.Text item)
 {
     System.Threading.Thread.Sleep(sleepTime);
     item.Click();
     System.Threading.Thread.Sleep(sleepTime);
     return(true);
 }
コード例 #2
0
ファイル: Extension.cs プロジェクト: nareshbandi123/ads
 public static void ClickThis(this Ranorex.Text item)
 {
     try
     {
         item.Click();
         Sleep();
     }
     catch (Exception ex)
     {
         throw new Exception("Text Click Failed : " + ex.Message);
     }
 }
コード例 #3
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            TestReport.BeginTestModule(this.GetType().Name);
            Global.xdocModule   = XDocument.Load(@"C:\PAL\Automation\Modules\" + this.GetType().Name + ".config");
            Global.CriteriaType = "Entrance";

            Global.Proceed = false;
            Verify V = new Verify();

            TestModuleRunner.Run(V);

            string Select = Global.xelModule.Attribute("Select").Value;

            switch (Select)
            {
            case "Basic":
                break;

            case "Pro":
                break;

            case "Not Intrested":
                if (Host.Local.TryFindSingle <Ranorex.Text>(xPathNotIntrested, 2000, out txtPURSelection))
                {
                    Report.Log(ReportLevel.Info, "Mouse", "Clicking Not intrested");
                    txtPURSelection.Click();
                }
                break;

            case "Renew":
                break;

            default:
                break;
            }



            Global.CriteriaType = "Exit";

            Global.Proceed = false;
            TestModuleRunner.Run(V);

            TestReport.EndTestModule();
            if (!Global.Proceed)
            {
                TestReport.EndTestCase(TestResult.Failed);
            }
        }
コード例 #4
0
ファイル: IncludeCustomer.cs プロジェクト: joeyrodrigue/PAL
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            TestReport.BeginTestModule(this.GetType().Name);
            Global.xdocModule   = XDocument.Load(@"C:\PAL\Automation\Modules\" + this.GetType().Name + ".config");
            Global.CriteriaType = "Entrance";

            Global.Proceed = false;
            Verify V = new Verify();

            TestModuleRunner.Run(V);

            bool AddCustomer = Convert.ToBoolean(Global.xelModule.Attribute("AddCustomer").Value);

            if (!AddCustomer)
            {
                if (Host.Local.TryFindSingle <Ranorex.Button>(xPathDoNotInclude, 2000, out btnDoNotInclude))
                {
                    Report.Log(ReportLevel.Info, "Mouse", "Clicking Do Not Include");
                    btnDoNotInclude.Click();
                }
            }
            else
            {
                if (Host.Local.TryFindSingle <Ranorex.Text>(xPathFindCustomer, 2000, out txtFindCustomer))
                {
                    txtFindCustomer.Click();
                    FindCustomer mFindCustomer = new FindCustomer();
                    TestModuleRunner.Run(mFindCustomer);
                }
            }



            Global.CriteriaType = "Exit";

            Global.Proceed = false;
            TestModuleRunner.Run(V);

            TestReport.EndTestModule();
            if (!Global.Proceed)
            {
                TestReport.EndTestCase(TestResult.Failed);
            }
        }
コード例 #5
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            TestReport.BeginTestModule(this.GetType().Name);
            Global.xdocModule   = XDocument.Load(@"C:\PAL\Automation\Modules\" + this.GetType().Name + ".config");
            Global.CriteriaType = "Entrance";

            Global.Proceed = false;
            Verify V = new Verify();

            TestModuleRunner.Run(V);

            string TenderAmount = "";
            string BalanceDue   = "";
            string Tender       = Global.xelModule.Attribute("Tender").Value;

            if (Host.Local.TryFindSingle <Ranorex.Text>(xPathBalanceDue, 2000, out txtBalanceDue))
            {
                BalanceDue = txtBalanceDue.TextValue.Replace("$", "");
            }

            if (Host.Local.TryFindSingle <Ranorex.Text>(xPathCash, 2000, out txtCash))
            {
                Report.Log(ReportLevel.Info, "Mouse", "Clicking Cash");
                txtCash.Click();
            }

            if (Host.Local.TryFindSingle <Ranorex.Text>(xPathAmountPaid, 2000, out txtAmountPaid))
            {
                switch (Tender)
                {
                case "Exact":
                    TenderAmount = BalanceDue;
                    break;

                case "Split w/ Credit Prompt":

                    break;

                case "Split":

                    break;

                case "Over":

                    break;

                default:
                    break;
                }

                Report.Log(ReportLevel.Info, "Keyboard", "Typing " + TenderAmount + " and a Return in AmountPaid");
                txtAmountPaid.PressKeys(TenderAmount + "{Return}");
            }


            Validate.Exists(xPathChangeDue, 5000, "Change Due Prompt Displayed", false);

            GamestopAutomationRepository repo = GamestopAutomationRepository.Instance;

            RepoItemInfo ChangeDueInfo = new RepoItemInfo(repo, "ChangeDue", xPathChangeDue, 30000, null);

            ChangeDueInfo.WaitForNotExists(30000);

            //Validate.NotExists(xPathChangeDue,10000,"Change Due Prompt Closed",false);


            Global.CriteriaType = "Exit";

            Global.Proceed = false;
            TestModuleRunner.Run(V);

            TestReport.EndTestModule();
            if (!Global.Proceed)
            {
                TestReport.EndTestCase(TestResult.Failed);
            }
        }