Пример #1
0
        public void UpdateHotel()
        {
            try
            {
                //Arranage
                string    Email    = ConfigurationManager.AppSettings["Email"].ToString().Trim();
                string    Password = ConfigurationManager.AppSettings["Password"].ToString().Trim();
                DataTable TestData = ExcelUtilityHelper.ReadExcel("Update");

                //Login to the Application
                LoginHelper.Login(Email, Password);
                //Navigate to Dashboard Page
                NavigationHelper.Navigate();
                //Verify if Hotel Name exists in the Tablenif not return
                if (!HotelHelper.VerifyHotelNameAndClickEditButton(TestData))
                {
                    return;
                }
                //Perform General Tab actions
                HotelHelper.PerformGeneralTabActions(TestData);
                //Perform Facilities Tab actions
                HotelHelper.PerformFacilitiesTabActions();
                //Perform Meta Info Tab Actions
                HotelHelper.PerformMetaInfoTabActions();
                //Perform Policy Tab Actions
                HotelHelper.PerformPolicyTabActions();
                //Perform Contact tab Actions
                HotelHelper.PerformContactTabActions();
                //Perform Translate Tab actions
                HotelHelper.PerformTranslateTabActions();
                //Click on Update
                HotelHelper.ClickUpdate();
                //Verify if Hotel Name is updated in the Grid / Table
                Assert.IsTrue(HotelHelper.VerifyHotelName(TestData));
            }
            catch
            {
                Assert.Fail();
            }
        }
Пример #2
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();
            }
        }