Beispiel #1
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);
        }