//// mobile number date functions
        public void inputMobNumber()
        {
            Console.WriteLine(" write your mobile number : ");
            int    MobNumber;
            string input        = Console.ReadLine();
            bool   checkMobNumb = int.TryParse(input, out MobNumber);

            do
            {
                if (input != "restart_profile")
                {
                    if (!checkMobNumb || input.Count() > 9 || input.Count() < 9)
                    {
                        Console.WriteLine("Invalid date, please retry");
                        input = Console.ReadLine();

                        if (int.TryParse(input, out MobNumber) || input.Count() > 9 || input.Count() < 9)
                        {
                            checkMobNumb = true;
                        }
                        else if (input == "restart_profile")
                        {
                            restartProfile();
                        }
                    }
                }
                else
                {
                    restartProfile();
                }
            }while (checkMobNumb != true);
            inputData.MobileNumber = MobNumber.ToString();
        }
Esempio n. 2
0
        public ProfileItemListView()
        {
            InitializeComponent();

            Fname.Completed += (sender, e) => {
                SName.Focus();
            };
            SName.Completed += (sender, e) => {
                MobNumber.Focus();
            };
            MobNumber.Completed += (sender, e) => {
                Email.Focus();
            };
        }
Esempio n. 3
0
        public void FillPersonalDetails()
        {
            SelectElement oSelect = new SelectElement(driver.FindElement(By.Id("TitleCombo")));

            oSelect.SelectByText(ExcelOperation.GetData[1]);
            GivenName.Clear();

            string GivenNameString = GenericHelper.RandomString(5);

            ExcelOperation.AddData("TestData2", GivenNameString, "TC1_CreateAnEmployee");
            GivenName.SendKeys(GivenNameString);
            OtherName.Clear();

            OtherName.SendKeys(ExcelOperation.GetData[3]);
            Surname.Clear();
            Surname.SendKeys(ExcelOperation.GetData[4]);
            PreferenceName.Clear();

            PreferenceName.SendKeys(ExcelOperation.GetData[5]);
            DateOfBirth.Clear();
            DateOfBirth.SendKeys(ExcelOperation.GetData[6]);
            Gender.Click();

            MobNumber.Clear();
            // MobNumber.SendKeys(ExcelOperation.GetData[7]);
            MobNumber.SendKeys("9999 999999");
            EmailID.Clear();
            EmailID.SendKeys(ExcelOperation.GetData[8]);

            PerferedMethodToContact.Click();
            GenericHelper.AllScreenShot(driver);
            var ele = driver.FindElement(By.Id("CommandButtons_cmdNextEnabled"));
            IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("var ele=arguments[0];setTimeout(function(){ele.click();},100)", ele);
        }