コード例 #1
0
        private bool CheckFromAdmin(DataModel firstRow, string userName, string password)
        {
            loginPage = new LoginPage(this.Driver, this.CurrentTest);
            string loginPageTitle = loginPage.GetLoginTitle();

            //Verify login page title
            Assert.AreEqual(loginPageTitle.ToLower(), firstRow.P3);

            //login to application
            loginPage.LoginToHome(userName, password);

            loginPage.CheckForHome();

            // go the next page
            homePage = new HomePage(this.Driver, this.CurrentTest);
            homePage.ClickIdeasMenu();
            homePage.CheckforViewPage();

            ideasPage = new ViewIdeasPage(this.Driver, this.CurrentTest);
            ideasPage.ClickNotification();
            ideasPage.CheckforNotificationPage();

            approver = new IdeaApprover(this.Driver, this.CurrentTest);

            return(approver.CheckForIdeaRedirect());
        }
コード例 #2
0
        private void ExecuteIdeaPage(DataModel firstRow, string userName, string password, string selectionCategory, Action <ApproveIdea> ideaMethod)
        {
            loginPage = new LoginPage(this.Driver, this.CurrentTest);
            string loginPageTitle = loginPage.GetLoginTitle();

            //Verify login page title
            Assert.AreEqual(loginPageTitle.ToLower(), firstRow.P3);

            //login to application
            loginPage.LoginToHome(userName, password);

            loginPage.CheckForHome();

            // go the next page
            homePage = new HomePage(this.Driver, this.CurrentTest);
            homePage.ChangeToCategory(selectionCategory);
            this.WaitForReady();
            homePage.ClickIdeasMenu();
            homePage.CheckforViewPage();


            ideasPage = new ViewIdeasPage(this.Driver, this.CurrentTest);
            ideasPage.ClickNotification();
            ideasPage.CheckforNotificationPage();


            approver = new IdeaApprover(this.Driver, this.CurrentTest);
            approver.ApproveIdeas();
            approver.CheckforApproveIdeaPage();

            approveIdea = new ApproveIdea(this.Driver, this.CurrentTest);
            ideaMethod(approveIdea);

            homePage.GetUserLoggedOut();
            homePage.CheckForLoginPage();
        }