/// <summary> /// Filling the details in the conatct page /// </summary> public void FillTheDetails() { IWantToDropDown.Click(); IWantToDropDownOption.Click(); WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath(".//*[@id='contactForm']/div[4]/div[2]/div[2]/div/div[1]/button"))); ChangeButton.Click(); ChangeButtonOption.Click(); CurrentBenifitButton.Click(); CurrentBenifitButtonOption.Click(); DedutioPerDay.SendKeys(ExcelOperation.GetData[3]); PayDatePerChange.Click(); EmailID.Clear(); EmailID.SendKeys(ExcelOperation.GetData[4]); PreferedContact.Click(); MessageBox.SendKeys(ExcelOperation.GetData[5]); if (SubmitMessage.Text != "Submit") { throw new Exception(); } }
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); }