public void SearchTomorrowsDate() { utilities.ConsoleMessageStart(); utilities.extenttest = utilities.extent.StartTest("Access New Booking Page"); utilities.extenttest.AssignCategory("New Booking Tests"); callingloginmethods(); newbookingMain.AccessingNewBookingLink(); newbookingMain.SearchTomorrowsDate(); newbookingMain.DurationHourDropdown(); Thread.Sleep(3000); newbookingMain.DurationMinutesDropdown(); }
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(); } }
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(); } }