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();
        }
Example #2
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();
        }
Example #3
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();
        }
Example #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();
        }
        public void CSelectNumberOfRooms()
        {
            BaseClass baseClass = new BaseClass(driver);

            baseClass.BrowserFunctions();
            //driver.Navigate().GoToUrl("https://www.adactin.com/HotelApp/");
            //LoginPage loginPage = new LoginPage(driver);
            //loginPage.Login("VidhyaVenugan", "Ithika2015"); //commented because we have created a method for these functions in base class
            //Assert.True(driver.Title.Contains("Search"));
            SearchHotelPage searchHotel = new SearchHotelPage(driver);

            searchHotel.SelectNumberOfRooms("4 - Four");
            searchHotel.ClickSearch();
            //Assert.AreEqual(searchHotel.RoomsErrorMsg(), " ");
            driver.Quit();
        }
        public void DNumberOfRoomsNotSelected()
        {
            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"));
            baseClass.Login();
            SearchHotelPage searchHotel = new SearchHotelPage(driver);

            searchHotel.SelectNumberOfRooms("- Select Number of Rooms -");
            Assert.AreEqual(searchHotel.RoomsErrorMsg, "Please Select Total Number of Rooms");
            searchHotel.ClickSearch();
            driver.Quit();
        }