Exemplo n.º 1
0
        internal bool IsContactPageTitleCorrect()
        {
            var testStepResult = Driver.Title.Contains(ContactUsPageTitle);

            Console.WriteLine(Driver.Title);
            ReporterHelper.LogTestStep(
                testStepResult,
                "Contact Page title is correct",
                $"Expected page title was {ContactUsPageTitle} but actual page title is: {Driver.Title}"
                );
            return(testStepResult);
        }
Exemplo n.º 2
0
        internal bool IsPageTitleCorrect()
        {
            var testStepResult = Driver.Title.Equals(InsightsPageTitle);

            Console.WriteLine(Driver.Title);
            ReporterHelper.LogTestStep(
                testStepResult,
                "Insight Page title is correct",
                $"Expected page title was {InsightsPageTitle} but actual page title is: {Driver.Title}"
                );
            return(testStepResult);
        }
Exemplo n.º 3
0
        internal bool FilterByBusinessValues()
        {
            ScrolltotheElement();
            Driver.FindElement(FilterByBusinessLocator).Click();
            SelectElement selectElement = new SelectElement(Driver.FindElement(FilterByBusinessLocator));

            selectElement.SelectByText(ExpectedResultValue);
            ScrolltotheElement();

            //Verify the result page displaying as per selected value from the drop down
            string ActualResultValue = Driver.FindElement(OctopusEnergyLocator).Text;
            var    testStepResult    = ActualResultValue.Equals(ExpectedResultValue);

            ReporterHelper.LogTestStep(
                testStepResult,
                "Page result is correct as per  selected  value from the drop down",
                $"Expected page result was {ExpectedResultValue} but actual page result is: {ActualResultValue}"
                );
            return(testStepResult);
        }
Exemplo n.º 4
0
        internal bool SearchByText()
        {
            ScrolltotheElement();

            Driver.FindElement(SearchKeywordLocator).Click();
            Driver.FindElement(SearchKeywordLocator).Clear();
            Driver.FindElement(SearchKeywordLocator).SendKeys(ExpectedResultText);
            Driver.FindElement(SubmitButton).Submit();

            ScrolltotheElement();
            //Verify the result page displaying search result text

            string ActualResultText = Driver.FindElement(OctopusGroupLocator).Text;

            var testStepResult = ActualResultText.Equals(ExpectedResultText);

            ReporterHelper.LogTestStep(
                testStepResult,
                "Search Page result is correct",
                $"Expected page result was {ExpectedResultText} but actual page result is: {ActualResultText}"
                );
            return(testStepResult);
        }