コード例 #1
0
        public void HomePage_UKPRN_When_NumericNumberUpdated_ShouldNotShowError()
        {
            HomeObjects homeWindow   = WindowObjects.Windows.Main.SelectHomeTab; //select the learner tab
            string      invalidUKPRN = RandomStrings.GetRandomNumber(8);

            homeWindow.SetUkPRN(invalidUKPRN);
            var error = homeWindow.GetUKPRNValidationMessage;

            Assert.True(string.IsNullOrEmpty(error));
        }
コード例 #2
0
        public void HomePage_UKPRN_When_NonNumeric_ShouldShowError()
        {
            HomeObjects homeWindow   = WindowObjects.Windows.Main.SelectHomeTab; //select the learner tab
            string      invalidUKPRN = RandomStrings.GetRandomAlphabets(8);

            homeWindow.SetUkPRN(invalidUKPRN);
            var error = homeWindow.GetUKPRNValidationMessage;

            Assert.Equal(error.TrimEnd(), expectedUKPRNMessage);
        }
コード例 #3
0
        public void HomePage_CheapHotelRental_Verification()
        {
            if (!IsTcAdded)
            {
                Report.AddToHtmlReportTCHeader("Home Page Test Cases");
                IsTcAdded = true;
            }

            Report.AddToHtmlReport("TC_HP_004: To verify cheap rental among searched hotels.", true, false, true);

            Report.AddToHtmlReport("STEP 1: Insert Url in Browser Addressbar.", false, true);

            driver = Browser.OpenWithSelectedBrowser(driver, ProjectUrl, true);

            HomeObjects objHome = new HomeObjects();

            driver = objHome.HomePage_CheapHotelRental_Verification(driver);

            if (Convert.ToInt16(ConfigurationSettings.AppSettings.Get("CloseBrowser")) == 1)
            {
                Browser.CloseBrowser(driver);
            }
        }
コード例 #4
0
        public void HomePage_HotelSearch_Verification()
        {
            if (!IsTcAdded)
            {
                Report.AddToHtmlReportTCHeader("Home Page Test Cases");
                IsTcAdded = true;
            }

            Report.AddToHtmlReport("TC_HP_003: To verify Search Hotels functionality on PHPTravels Home page.", true, false, true);

            Report.AddToHtmlReport("STEP 1: Insert Url in Browser Addressbar.", false, true);

            driver = Browser.OpenWithSelectedBrowser(driver, ProjectUrl, true);

            HomeObjects objHome = new HomeObjects();

            driver = objHome.HomePage_HotelSearch_Verification(driver);

            if (Convert.ToInt16(ConfigurationSettings.AppSettings.Get("CloseBrowser")) == 1)
            {
                Browser.CloseBrowser(driver);
            }
        }
コード例 #5
0
 public HomeViewModel()
 {
     HomeObjects = new HomeObjects(Helpers.Identity.CurrentUser.Id, IidCulture.CurrentLanguageId);
 }