Guest User

Untitled

a guest
Oct 16th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. class Entrypoint
  2.  
  3. {
  4. IWebDriver driver = new ChromeDriver();
  5. **driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20);**
  6. driver.Navigate().GoToUrl("https://r1.netrevelation.com:8443/mcba-cms/pages/flight-transfer.cab");
  7. driver.Manage().Window.Maximize();
  8.  
  9.  
  10. driver.FindElement(By.Id("loginlink")).Click();
  11. driver.FindElement(By.Id("headerSubView:inputUserName:input")).SendKeys("st001");
  12. driver.FindElement(By.Id("headerSubView:inputPassword:input")).SendKeys("hello321" + Keys.Enter);
  13.  
  14. driver.FindElement(By.Id("dateOfFlight:input")).Click();**//This Step does not get Executed , it throws exception element not found.**
  15. driver.FindElement(By.Id("ui-datepicker-div")).Click();
  16. driver.FindElement(By.XPath(".//*[@id='ui-datepicker-div']/div/a[2]/span")).Click();
  17. driver.FindElement(By.LinkText("28")).Click();
  18. IWebElement Flightno = driver.FindElement(By.Id("selectedFlight:input"));
  19. Flightno.SendKeys("BA901" + Keys.Enter);
  20. IWebElement Flighttick = driver.FindElement(By.Id("flightTickImg"));
  21.  
  22.  
  23. driver.Quit();
Add Comment
Please, Sign In to add comment