Example #1
0
        /// <summary>
        ///
        /// </summary>
        protected override void ExecuteTestCase()
        {
            Reporter.Chapter.Title = "Clicks all the links in the webportal";
            Step = "Login into web portal application";
            CommonPage.NavigateTo(Driver, Reporter, Util.EnvironmentSettings["Server"]);
            CommonPage.Login(Driver, Reporter, UserName, Password);

            Step = "Select " + TestData["APPLICATIONNAME"] + " link from the navigation menu";
            CommonPage.SelectApplication(Driver, Reporter, TestData["APPLICATIONNAME"]);

            Step = "Assert page title of " + TestData["TITLE"] + "";
            CommonPage.AssertPageTitle(Driver, Reporter, TestData["TITLE"]);

            int menuCount = CommonPage.GetMenuCount(Driver, Reporter, TestData["APPLICATIONNAME"]);

            for (int menu = 1; menu <= menuCount; menu++)
            {
                MenuNames.Add(CommonPage.GetMenuNames(Driver, Reporter, menu));
            }

            Step = "Number of menu items in  " + "<b>" + TestData["APPLICATIONNAME"] + "</b>" + "menu is:" + menuCount + "";
            foreach (string menu in MenuNames)
            {
                Step = "Click on " + "<b>" + menu + "</b>" + " menu and click links under it";
                CommonPage.ClickAllSubMenusInMenu(Driver, Reporter, resultsPath, menu);
            }
        }
        protected override void ExecuteTestCase()
        {
            Reporter.Chapter.Title = "Clicks all the links in the webportal";
            Step = "Login into web portal application";
            CommonPage.NavigateTo(Driver, Reporter, Util.EnvironmentSettings["Server"]);
            CommonPage.Login(Driver, Reporter, UserName, Password);

            Step = "Select " + TestData["APPLICATIONNAME"] + " link from the navigation menu";
            CommonPage.SelectApplication(Driver, Reporter, TestData["APPLICATIONNAME"]);

            Step = "Assert page title of " + TestData["TITLE"] + "";
            CommonPage.AssertPageTitle(Driver, Reporter, TestData["TITLE"]);

            Step      = "Get the menu count  and menu names in " + "<b>" + TestData["APPLICATIONNAME"] + "</b>" + "";
            menuCount = CommonPage.GetMenuCount(Driver, Reporter, TestData["APPLICATIONNAME"]);
            menuNames = CommonPage.GetMenuNames(Driver, Reporter, menuIndex, menuCount);

            Step = "Number of menu items in  " + "<b>" + TestData["APPLICATIONNAME"] + "</b>" + " menu is:" + "<b>" + menuCount + "</b>" + ", Check below";

            foreach (string menuItem in menuNames)
            {
                Step = (intiterator++) + ". Click the " + "<b>" + menuItem + "</b>" + " menu and click all sub menus under it";
                CommonPage.ClickAllSubMenusInEachMenu(Driver, Reporter, resultsPath, menuItem, menuNames);
            }
        }
Example #3
0
        protected override void ExecuteTestCase()
        {
            Reporter.Chapter.Title = "Clicks all the links in the webportal";
            Step = "Login into web portal application";
            CommonPage.NavigateTo(Driver, Reporter, Util.EnvironmentSettings["Server"]);
            CommonPage.Login(Driver, Reporter, UserName, Password);
            try
            {
                foreach (string application in applications)
                {
                    Step = "Select " + application + " from the navigation menu";
                    CommonPage.SelectApplication(Driver, Reporter, application);

                    Step      = "Get the menu count  and menu names in " + "<b>" + application + "</b>" + " application";
                    menuCount = CommonPage.GetMenuCount(Driver, Reporter, application);
                    menuNames = CommonPage.GetMenuNames(Driver, Reporter, menuIndex, menuCount);

                    Step = "Number of links in  " + "<b>" + application + "</b>" + " is:" + "<b>" + menuCount + "</b>" + ", Check below";

                    foreach (string menuItem in menuNames)
                    {
                        Step = (intiterator++) + ". Click " + "<b>" + menuItem + "</b>" + " and click sub menus under it";
                        CommonPage.ClickAllSubMenusInEachMenu(Driver, Reporter, resultsPath, menuItem, menuNames);
                    }

                    Step = "Switch to " + "<b>" + application + "</b>" + " application";
                    CommonPage.SwitchApplication(Driver, Reporter, application);
                }
            }
            catch (System.Exception)
            {
                CommonPage.AcceptOrDissmissAlertIfPresent(Driver, Reporter);
                CommonPage.AcceptErrorMessageIfPresent(Driver, Reporter, resultsPath);
            }
        }