Exemplo n.º 1
0
        public void AddHotel()
        {
            try
            {
                //Arranage
                string    Email    = ConfigurationManager.AppSettings["Email"].ToString().Trim();
                string    Password = ConfigurationManager.AppSettings["Password"].ToString().Trim();
                DataTable TestData = ExcelUtilityHelper.ReadExcel("Insert");

                //Act
                //Login to the Application
                LoginHelper.Login(Email, Password);
                //Navigae to the Dashboard Page
                NavigationHelper.Navigate();
                //Click on Add Button to add Hotel
                HotelHelper.ClickAddButton();
                //Perform actions on Genral Tab
                HotelHelper.PerformGeneralTabActions(TestData);
                //Perform actions on Facilities Tab
                HotelHelper.PerformFacilitiesTabActions();
                //Perform actions on Meta Info Tab
                HotelHelper.PerformMetaInfoTabActions();
                //Perform actions on Policy Tab
                HotelHelper.PerformPolicyTabActions();
                //Perform actions on Contact Tab
                HotelHelper.PerformContactTabActions();
                //Perform actions on Translate Tab
                HotelHelper.PerformTranslateTabActions();
                //Perform actions on Submit
                HotelHelper.ClickSubmit();

                //Assert
                //Verify if
                Assert.IsTrue(HotelHelper.VerifyHotelName(TestData));
            }
            catch
            {
                Assert.Fail();
            }
        }