public void KCreditCardExpiryYearSelected() { BaseClass baseClass = new BaseClass(driver); baseClass.BrowserFunctions(); //driver.Url = "https://www.adactin.com/HotelApp/"; LoginPage loginPage = new LoginPage(driver); loginPage.Login("VidhyaVenugan", "Ithika2015"); Assert.True(driver.Title.Contains("Search")); SearchHotelPage searchHotel = new SearchHotelPage(driver); searchHotel.SelectLocation("Melbourne"); searchHotel.SelectNumberOfRooms("1 - One"); searchHotel.CheckInDate("21/01/2019"); searchHotel.CheckOutDate("22/01/2019"); searchHotel.AdultsPerRoom("2 - Two"); searchHotel.ClickSearch(); Assert.True(driver.Title.Contains("Select")); SelectHotelPage selectHotel = new SelectHotelPage(driver); selectHotel.SelectRadioButton(); selectHotel.SelectContinue(); Assert.True(driver.Title.Contains("Book")); BookHotelPage bookHotel = new BookHotelPage(driver); bookHotel.EnterName("Vidhya", "Venugan"); bookHotel.BillingAddress("12 Ebony Way,Tarneit -3029"); bookHotel.CreditCardNumber("1234567812345678"); bookHotel.CreditCardType("VISA"); bookHotel.CreditCardExpiryMonth("March"); bookHotel.CreditCardExpiryYear("2020"); bookHotel.ClickBookNow(); driver.Quit(); }
public void WhenILoginAndDoNotEnterAnyOneOfTheMandatoryField() { BaseClass baseClass = new BaseClass(driver); //baseClass.BrowserFunctions(); baseClass.Login(); baseClass.SearchHotel(); baseClass.SelectHotel(); BookHotelPage bookHotel = new BookHotelPage(driver); bookHotel.EnterName("Vidhya", "Venugan"); bookHotel.BillingAddress("12 Ebony Way,Tarneit -3029"); bookHotel.CreditCardNumber("1234567812345678"); bookHotel.CreditCardType("VISA"); bookHotel.CreditCardExpiryMonth("March"); bookHotel.CreditCardExpiryYear("2020"); //bookHotel.CVVNumber("4567"); bookHotel.ClickBookNow(); }