public void HotelNotSelected()
        {
            BaseClass baseClass = new BaseClass(driver);

            baseClass.BrowserFunctions();
            //driver.Navigate().GoToUrl("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.SelectContinue();
            Assert.AreEqual(selectHotel.ContinueErrorMsg, "Please Select a Hotel");
            driver.Quit();
        }
Пример #2
0
        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();
        }
Пример #3
0
        public void BNamesNotEntered()
        {
            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.ClickBookNow();
            Assert.AreEqual(bookHotel.FirstNameErrorText, "Please Enter your First Name");
            Assert.AreEqual(bookHotel.LastNameErrorText, "Please Enter you La st Name");
            driver.Quit();
        }
Пример #4
0
        public void DBillingAddressNotEntered()
        {
            Login();
            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.ClickBookNow();
            Assert.AreEqual(bookHotel.BillingAddressErrorText, "Please Enter your Address");
            driver.Quit();
        }