public bool ApplicantMandatoryFill()
        {
            try
            {
                while (!ReadyPage())
                {
                    ;
                }

                Title.SendKeys(Titles.Prof);
                FirstName.EnterText(string.Format("{0}", Name));
                SureName.EnterText(string.Format("{0}", Name));
                Email.EnterText(Emails.HrmTest);
                PhoneNumber.EnterText("081-2564459");

                Nationality.Click();
                PropertiesCollection.Sleep500();
                NationalityGerman.Click();
                PropertiesCollection.Sleep100();

                ApplyNow.Click();
                while (!ReadyThankyou())
                {
                    ;
                }

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
        public bool InteressentMandatoryFill()
        {
            try
            {
                Language.SendKeys(LanguagesEnglishVersion.English);
                Title.EnterText(Titles.Ms);
                FirstName.EnterText(string.Format("{0}", Name));
                LastName.EnterText(string.Format("{0}", Name));
                Email.EnterText(Emails.HrmTest);
                Telephone.EnterText("084-2565584");

                Nationality.Click();
                PropertiesCollection.Sleep500();
                page1NationalityGerman.Click();

                Submit.Click();

                while (!ReadyThankyou())
                {
                    ;
                }

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
        public void FillUserForm(String firstname, String lastname, String regemail, String confemail, String regpwd)
        {
            //SeleniumSetMethods.EnterText(FirstName, firstname);
            //SeleniumSetMethods.EnterText(LastName, lastname);
            //SeleniumSetMethods.EnterText(Registered_Email, regemail);
            //SeleniumSetMethods.EnterText(Confirmation_Email, confemail);
            //SeleniumSetMethods.EnterText(Registered_Password, regpwd);
            //SeleniumSetMethods.Click(Save_Button);



            FirstName.EnterText(firstname);
            LastName.EnterText(lastname);
            Registered_Email.EnterText(regemail);
            Confirmation_Email.EnterText(confemail);
            Registered_Password.EnterText(regpwd);
            Save_Button.Clickk();
            Console.WriteLine("Details filled successfully");
            Console.WriteLine("Changes Done");
        }
Beispiel #4
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();*/
        }