Exemplo n.º 1
0
        public void BookingTitle()
        {
            utilities.ConsoleMessageStart();
            utilities.extenttest = utilities.extent.StartTest("Booking Title Validation");
            utilities.extenttest.AssignCategory("Booking Summary Tests");
            callingloginmethods();
            newbookingMain.AccessingNewBookingLink();
            newbookingMain.DurationHourDropdown();
            newbookingMain.DurationHourDropdown();
            newbookingMain.ResourceTypeDropdown();
            Thread.Sleep(2000);
            newbookingMain.SearchButton();
            Thread.Sleep(2000);
            newbookingMain.SelectingFirstResource();
            Thread.Sleep(2000);
            newbookingMain.GoToSummary();
            Thread.Sleep(2000);
            bookingsummaryMain.AddTitleDetails();
            bookingsummaryMain.AddHostDetails();
            Thread.Sleep(2000);
            bookingsummaryMain.SingleBookingSave();
            Thread.Sleep(3000);
            bookingsummaryMain.AcceptSaveBookingPopUP();
            Thread.Sleep(3000);

            var bookingtitletext = this.Map.BookingTitleInput.GetAttribute("Value");

            Console.WriteLine(bookingtitletext);

            Thread.Sleep(3000);

            GetReferenceNumber();
            Thread.Sleep(3000);

            utilities.DBConnect("SELECT ReferenceNumber, Title From [Booking] where ReferenceNumber = '" + refNumber + "'");

            Thread.Sleep(3000);

            if (Bookingtitle == bookingtitletext && utilities.data.Contains(refNumber) && utilities.data.Contains(Bookingtitle))
            {
                Console.WriteLine("Test Pass");
                utilities.extenttest.Log(LogStatus.Pass, "Assert pass ");
                Assert.Pass();
            }
            else
            {
                Console.WriteLine("Booking title entered and booking title saved doesn't match.");
                Assert.Fail();
            }
        }
Exemplo n.º 2
0
 public void AllowMultipleHostsYes()
 {
     //Utilities config for reporting
     utilities.ConsoleMessageStart();
     utilities.extenttest = utilities.extent.StartTest("Allow Mulitple Hosts Yes");
     utilities.extenttest.AssignCategory("Business Rule Settings Tests");
     //Setup test configurations
     callLoginMethods();
     adminMain.AccessAdminModule();
     adminMain.BRESettingsLink();
     BREMain.SelectAllowMultipleHostsYes();
     //Logout and login to refresh setting changes
     //BREMain.ReLogin();
     callReLoginMethods();
     //Run actual test actions
     newBookingMain.AccessingNewBookingLink();   //Access new booking tab
     //newBookingMain.SingleBookingSummary();  //search for single booking and go to summary
     //START new booking creation
     newBookingMain.DurationHourDropdown();
     newBookingMain.DurationHourDropdown();
     newBookingMain.ResourceTypeDropdown();
     Thread.Sleep(2000);
     newBookingMain.SearchButton();
     Thread.Sleep(2000);
     newBookingMain.SelectingFirstResource();
     Thread.Sleep(2000);
     newBookingMain.GoToSummary();
     Thread.Sleep(4000);
     //END new booking creation
     _bookingSummaryMain.AddTitleDetails();           //Add title
     _bookingSummaryMain.AddHostDetails();            //Add Host
     _bookingSummaryMain.AddExternalHostDetails();    //Add 2nd host as an external host
     //If popup displays case fails - If no popup display case passes
     try
     {
         driver.SwitchTo().Alert();
         Console.WriteLine("Adding multiple hosts failed.");
         Assert.Fail();
     }
     catch (NoAlertPresentException Ex)
     {
         Console.WriteLine("Adding multiple hosts passed.");
         utilities.extenttest.Log(LogStatus.Pass, "Assert pass ");
         Assert.Pass();
     }
 }
 public void NewBookingPage()
 {
     utilities.ConsoleMessageStart();
     utilities.extenttest = utilities.extent.StartTest("Access New Booking Page");
     utilities.extenttest.AssignCategory("New Booking Tests");
     callingloginmethods();
     newbookingMain.AccessingNewBookingLink();
     if (this.driver.FindElement(By.XPath("//*[@id='ctl00_Td5']/table/tbody/tr/td/table/tbody/tr[4]/td")).Displayed)
     {
         Console.WriteLine("New Booking Link Clicked");
         utilities.extenttest.Log(LogStatus.Pass, "Assert pass ");
         Assert.Pass();
     }
     else
     {
         Console.WriteLine("New Booking Link was not clicked");
         Assert.Fail();
     }
 }
Exemplo n.º 4
0
        public void Case3622()//Assign to Sumit - Done
        {
            utilities.ConsoleMessageStart();
            utilities.extenttest = utilities.extent.StartTest("TFS Case 3622 Resource notes not displaying on My bookings page");
            utilities.extenttest.AssignCategory("Case 3622. Resource notes not showing on my bookings page.");
            webappLogin.NavigateTo();
            webappLogin.LogInSuccess(); //WebApp Login
            Thread.Sleep(4000);
            try
            {
                NewBookingMain.AccessingNewBookingLink();//New booking link
                NewBookingMain.FromDate();
                Thread.Sleep(2000);
                NewBookingMain.ToDate();
                Thread.Sleep(1000);
                NewBookingMain.SearchButton();
                Thread.Sleep(1000);
                NewBookingMain.SelectMultiResourceforBooking();// Select multiresource for booking
                Thread.Sleep(1000);
                NewBookingMain.GoToSummary();
                Thread.Sleep(2000);

                booking.BookingTitle();
                Thread.Sleep(2000);
                NewBookingMain.participantcount();            // Add no of paricipant
                Thread.Sleep(2000);
                NewBookingMain.AddPeople();                   // click on Add People tab
                Thread.Sleep(2000);
                webAppBookingSummaryMain.internalsearchbox(); // Search for internal Atendee
                Thread.Sleep(2000);
                webAppBookingSummaryMain.internalsearchboxfornextAttendee();
                Thread.Sleep(2000);
                NewBookingMain.SelectAttendeeforresource();// select attendee for booking
                Thread.Sleep(1000);
                booking.SaveandexistBooking();
                Thread.Sleep(2000);

                //Open New Tab in the Same window and continue on the new Window.
                ((IJavaScriptExecutor)driver).ExecuteScript("window.open();");
                driver.SwitchTo().Window(driver.WindowHandles.Last());

                Thread.Sleep(2000);
                login.NavigateTo();   //Navigate to QB
                login.LoginSuccess(); //Login to QB
                Thread.Sleep(4000);
                mybookings.MyBookingsSelect();
                Thread.Sleep(1000);
                editBookingMain_s.EditBookingPencil();
                Thread.Sleep(2000);
                booking.EditForAddPeople();
                Thread.Sleep(1000);
                booking.QBAteendee();//Verify Assign Attendee added from Webapp with respective Resource
                Thread.Sleep(1000);

                Console.WriteLine("TFS case 3622 run Sucessfully! ");
            }
            catch
            {
                Console.WriteLine("TFS case 3622 Failed !!");
            }
        }