Example #1
0
        public void IndividualDetails()
        {
            /*Individual details*/
            SetMethods.ImplicitlyWait(10);
            PersalNum.EnterText("061375468");
            TitleArrow.Clicks();
            Thread.Sleep(500);
            Mr.Clicks();
            Surname.EnterText("Tailor");
            Initial.EnterText("D");
            IDNum.EnterText("8710039822081");
            OutSide.Clicks();
            Thread.Sleep(1500);
            Age.EnterText("32");
            Thread.Sleep(1000);
            GenderArrow.Clicks();
            Thread.Sleep(500);
            Male.Clicks();

            /*PersalNum.SendKeys("061375468");
             * TitleArrow.Click();
             * Thread.Sleep(500);
             * Mr.Click();
             * Surname.SendKeys("Tailor");
             * Initial.SendKeys("JH");
             * IDNum.SendKeys("8710039822081");
             * OutSide.Click();
             * Age.SendKeys("32");
             * GenderArrow.Click();
             * Thread.Sleep(500);
             * Male.Click();*/
        }
Example #2
0
        public void FillUserForm(string initial, string firstName, string middleName)
        {
            //扩展类的使用;
            Initial.EnterText(initial);
            FirstName.EnterText(firstName);
            MiddleName.EnterText(middleName);
            BtnSave.Click();


            //use the custome methods to set and get
//            SeleniumSetMethods.EnterText(Initial, initial);
//            SeleniumSetMethods.EnterText(FirstName, firstName);
//            SeleniumSetMethods.EnterText(MiddleName,middleName);
//            SeleniumSetMethods.Click(BtnSave);

            /*Initial.SendKeys(initial);
             * FirstName.SendKeys(firstName);
             * MiddleName.SendKeys(middleName);
             * BtnSave.Click();*/
        }