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); } }
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); }
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); }
//[TearDown] public void TearDown() { DriverUtil.Teardown(); }
//[SetUp] public void Setup() { DriverUtil.LaunchBrowser(); }
public List <string> getRefinerValues() { List <string> refinerList = DriverUtil.GetIwebElementTextToStringList(By.ClassName("ms-ref-refinername")); return(refinerList); }
//[SetUp] public void Setup() { DriverUtil.Setup(); }
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"); }