public void ThenTheProviderResultsReturnedWillMatchTheExpectedValues()
        {
            //checks the providers returned by the SQL match the providers displayed on screen
            ProviderResultsHelper.ValidateProvidersDisplayed();
            SelectProvidersPage selectProvidersPage = new SelectProvidersPage(webDriver);

            selectProvidersPage.VerifyResultsCount();
        }
Example #2
0
        public void ThenIShouldSeeProviderResultsDisplayedOnlyForOneRoute()
        {
            ProviderResultsHelper.AllProviders_OneSkillArea();
            int providerResultsReturned = ScenarioContext.Current.Get <int>("SearchResultsCount");
            ProviderResultsOnlyPage providerResultsOnlyPage = new ProviderResultsOnlyPage(webDriver);

            providerResultsOnlyPage.VerifyProviderResultsReturnedAreCorrect(providerResultsReturned);
        }
Example #3
0
        public void VerifyChosenProvidersAreDisplayedOnCheckAnswersScreen()
        {
            String provider1 = (string)ScenarioContext.Current["_Provider1"];

            //String provider2 = (string)ScenarioContext.Current["_Provider2"];
            ProviderResultsHelper.VerifyProviderDisplayed(provider1, provider1Name);
            Console.WriteLine(provider1 + " Verified");
            //PageInteractionHelper.VerifyProviderDisplayed(provider2, provider2Name);
            //Console.WriteLine(provider2 + "Verified");
        }
Example #4
0
        public void ThenTheSelectProvidersPageWillDisplayTheCountResultAndRoutesInTheHHeading(int p0)
        {
            ProviderResultsHelper.AllProviders_TwoSkillArea();
            int providerResultsReturned = ScenarioContext.Current.Get <int>("SearchResultsCount");
            ProviderResultsOnlyPage providerResultsOnlyPage = new ProviderResultsOnlyPage(webDriver);

            providerResultsOnlyPage.VerifyProviderResultsReturnedAreCorrect(providerResultsReturned);
            providerResultsOnlyPage.VerifysHeadingShowsResultsFor();
            providerResultsOnlyPage.VerifySkillsetDisplayed(Constants.skillAreaFilter1 + " and " + Constants.skillAreaFilter2);
        }
Example #5
0
        public static void SetUp()
        {
            String browser = Configurator.GetConfiguratorInstance().GetBrowser();

            switch (browser)
            {
            case "firefox":
                webDriver = new FirefoxDriver();
                webDriver.Manage().Window.Maximize();
                break;

            case "chrome":
                var chromeOptions = new ChromeOptions();
                chromeOptions.AddArguments(new List <string>()
                {
                    "--no-sandbox,", "--incognito", "headless",
                });
                webDriver = new ChromeDriver(chromeOptions);
                break;

            case "ie":
                webDriver = new InternetExplorerDriver();
                webDriver.Manage().Window.Maximize();
                break;

            //    ---This driver is not supported at this moment.This will be revisited in future-- -
            //case "htmlunit":
            //    webDriver = new RemoteWebDriver(DesiredCapabilities.HtmlUnitWithJavaScript());
            //    break;

            //case "phantomjs":
            //    webDriver = new PhantomJSDriver();
            //    break;

            case "zapProxyChrome":
                InitialiseZapProxyChrome();
                break;

            default:
                throw new Exception(
                          $"Driver name - {browser}does not match OR this framework does not support the webDriver specified");
            }

            webDriver.Manage().Window.Maximize();
            webDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(15);
            webDriver.Manage().Cookies.DeleteAllCookies();
            String currentWindow = webDriver.CurrentWindowHandle;

            webDriver.SwitchTo().Window(currentWindow);
            webDriver.Navigate().GoToUrl(Configurator.GetConfiguratorInstance().GetBaseUrl());

            PageInteractionHelper.SetDriver(webDriver);
            ProviderResultsHelper.SetDriver(webDriver);
        }
 private void SelectProviders()
 {
     FormCompletionHelper.ClickElement(Provider1Checkbox);
     ProviderResultsHelper.SetProviderNames(providerName1);
 }
 public void GivenIHaveEnteredAPostcode()
 {
     ProviderResultsHelper.AllProviders_AllSkillAreas();
 }
 public void ThenIHaveRunTheMethodToReturnAllProvidersWithinMiles(int p0)
 {
     ProviderResultsHelper.ValidateProvidersDisplayed();
 }