コード例 #1
0
        public void TestPageTitle()
        {
            // Test Data
            string expectedPageTitle = "Wikipedia, the free encyclopedia";

            GenericMethods.LoadPage(webapplication);                // Load the Wikipedia page
            string actualPageTitle = GenericMethods.GetPageTitle(); // Get the title of the page

            CustomValidator.AreEquals(expectedPageTitle, actualPageTitle, "Page title Mismatched");
        }
コード例 #2
0
        public void TestFirstResultTitleAndContentTable()
        {
            // Test Data
            string suggestionString      = "furry rabbits";
            string selectResultIndex     = "1"; // Select First Link from the result info
            string expectedAarticleTitle = "Furry fandom - Wikipedia";

            GenericMethods.LoadPage(webapplication);                       // Load the Wikipedia page
            WikipediaMainPage.InputSearch(suggestionString);               // Input search string to the input box and click search
            SearchResultsPage.selectGivenResultLink(selectResultIndex);    // Select the first article
            string actualArticlePageTitle = GenericMethods.GetPageTitle(); // Title of the page

            CustomValidator.AreEquals(expectedAarticleTitle, actualArticlePageTitle, "Title mismatched");
            ArticlePage.CheckTableOfContents(); // Verify the Table of Content on article page.
        }