public List <string> GetResultPgSections()
        {
            //List<string> resulPageSections = GlobalMethods.GetIwebElementTexttoStringList(By.XPath("//ul/li/h2[@class='ms-displayInline']"));
            List <string> resulPageSections = DriverUtil.GetIwebElementTextToStringList(By.CssSelector("ul>li>h2[class='ms-displayInline']"));

            return(resulPageSections);
        }
 public void EnterLocation(string locationName)
 {
     if (locationName.Length >= 1)
     {
         DriverUtil.ClickOnElementIgnoringStaleElementException(listLocation);
         //listLocation.Click();
         Thread.Sleep(2000);
         DriverUtil.ClearTextIgnoringStaleElementException(listLocation);
         //listLocation.Clear();
         DriverUtil.EnterTextIgnoringStaleElementException(listLocation, locationName.Substring(0, 4));
         //listLocation.SendKeys(locationName.Substring(0, 4));
         SelectFromDrpDwnIgnoringStaleElementException(locationName);
         //SelectFromDropDownList(locationName);
     }
 }
示例#3
0
        public void SampleDataDrivenTestUsingCSVFile(string location, string chkInDate, string chkOutDate, string adults)
        {
            //Navigate to hotel site
            DriverUtil.NavigateToURL(AppNameHelper.appBaseURL);
            //Enter Location
            NavigateTo.HotelPg.EnterLocation(location);
            //Enter Checkin Date
            NavigateTo.HotelPg.Enter_CheckinDate(chkInDate);
            //Enter Checkout date
            NavigateTo.HotelPg.Enter_CheckOutDate(chkOutDate);
            //Select Number of adults
            NavigateTo.HotelPg.SeclectNumberOfAdults(adults);
            //Click On Search button
            NavigateTo.HotelPg.btnSearch.Click();
            //Read the location from results
            string actualLocation = DriverUtil.GetText(By.CssSelector("span[class='captext ellipsis go-right']"));

            //Verify location
            Assert.AreEqual(location, actualLocation);
        }
示例#4
0
        public void SampleBasicTest()
        {
            //Navigate to hotel site

            DriverUtil.NavigateToURL(AppNameHelper.appBaseURL);

            //Enter Location
            NavigateTo.HotelPg.EnterLocation("Moscow, Russia");

            //Select Number of adults
            NavigateTo.HotelPg.SeclectNumberOfAdults("4");

            //Enter Checkin Date
            NavigateTo.HotelPg.Enter_CheckinDate("6/24/2017");
            //Enter Checkout Date
            NavigateTo.HotelPg.Enter_CheckOutDate("6/27/2017");

            //Click On search button
            NavigateTo.HotelPg.btnSearch.Click();
            string actualLocation = DriverUtil.GetText(By.CssSelector("span[class='captext ellipsis go-right']"));

            Assert.AreEqual("Moscow, Russia", actualLocation);
        }
示例#5
0
 //[TearDown]
 public void TearDown()
 {
     DriverUtil.Teardown();
 }
示例#6
0
 //[SetUp]
 public void Setup()
 {
     DriverUtil.LaunchBrowser();
 }
        public List <string> getRefinerValues()
        {
            List <string> refinerList = DriverUtil.GetIwebElementTextToStringList(By.ClassName("ms-ref-refinername"));

            return(refinerList);
        }
示例#8
0
 //[SetUp]
 public void Setup()
 {
     DriverUtil.Setup();
 }
示例#9
0
 public void GlobalSetup()
 {
     driverUtil = new DriverUtil();
     ExtentTestManager.CreateParentTest(GetType().Name);
 }
 public LandingPageTests() : base(DriverUtil.DetermineBrowserType())
 {
 }
        public void ThenTheOptionsForEnteredDestinationShouldBeDisplayedOnTheScreen()
        {
            string actualLocation = DriverUtil.GetText(By.CssSelector("span[class='captext ellipsis go-right']"));

            Assert.AreEqual("Moscow, Russia", actualLocation);
        }
        public void GivenEnterTheDestination()
        {
            DriverUtil.NavigateToURL(AppNameHelper.appBaseURL);

            NavigateTo.HotelPg.EnterLocation("Moscow, Russia");
        }