public static void TellUsAbtRegularDriverPos(IWebDriver driver) { SetMethods.EnterText(driver, "/html/body/div[14]/div/div[2]/div/div[1]/div/div[2]/div[1]/div/div/input[1]", "02", "XPath"); SetMethods.EnterText(driver, "/html/body/div[14]/div/div[2]/div/div[1]/div/div[2]/div[1]/div/div/input[2]", "1990", "XPath"); SetMethods.Selecting(driver, "/html/body/div[14]/div/div[2]/div/div[1]/div/div[2]/div[2]/div/select", "RSA Drivers Licence", "XPath"); SetMethods.Selecting(driver, "/html/body/div[14]/div/div[2]/div/div[1]/div/div[2]/div[3]/div/select", "2 Years Comprehensive Insurance", "XPath"); }
public static void PersonalDetailsFill(IWebDriver driver) { SetMethods.Click(driver, "/html/body/div[11]/div/div[2]/div/div[1]/div[2]/div[2]/div[2]/button/img", "XPath"); SetMethods.EnterText(driver, "//*[@id='person-details-man']/div/div[1]/div[2]/div[1]/div/div/input", "John", "XPath"); SetMethods.EnterText(driver, "//*[@id='person-details-man']/div/div[1]/div[2]/div[2]/div/div/input", "Smith", "XPath"); SetMethods.EnterText(driver, "dayOfBirth-man", "01", "name"); SetMethods.EnterText(driver, "monthOfBirth-man", "05", "name"); SetMethods.EnterText(driver, "yearOfBirth-man", "1970", "name"); SetMethods.Selecting(driver, "//*[@id='person-details-man']/div/div[1]/div[2]/div[4]/div/select", "Single", "XPath"); SetMethods.EnterText(driver, "cell", "0815699088", "name"); SetMethods.EnterText(driver, "email", "*****@*****.**", "name"); SetMethods.Click(driver, "//*[@id='person-details-man']/div/div[1]/div[2]/div[7]/label[2]/i", "XPath"); SetMethods.EnterText(driver, "//*[@id='address-man']", "9th Rd, Midrand", "XPath"); }
public static void TellUsAbtYourCarPositive(IWebDriver driver) { driver.FindElement(By.Name("vehicle_one_description")).SendKeys("2014 VOLKSWAGEN POLO VIVO 1.4"); System.Threading.Thread.Sleep(2000); driver.FindElement(By.Name("vehicle_one_description")).SendKeys(Keys.Down); System.Threading.Thread.Sleep(2000); driver.FindElement(By.Name("vehicle_one_description")).SendKeys(Keys.Enter); System.Threading.Thread.Sleep(2000); SetMethods.Selecting(driver, "/html/body/div[10]/div/div[2]/div/div[1]/div[2]/div[2]/div[1]/select", "LOCKED GARAGE", "XPath"); Screenshot s7 = ((ITakesScreenshot)driver).GetScreenshot(); s7.SaveAsFile(@"C:\\Users\\mo5599\\Documents\Visual Studio 2013\\Projects\\New1\\New1\\Images\\S7.jpg"); IJavaScriptExecutor jx = (IJavaScriptExecutor)driver; jx.ExecuteScript("arguments[0].click()", driver.FindElement(By.XPath("/html/body/div[10]/div/div[2]/div/div[2]/button[2]"))); }