Пример #1
0
        [TestCase("user", "password")] //enters valid username and password
        public void TestFirstnameAndLastnameInProfilePage(string user, string password)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Profile page object
            ProfilePage profilePage = new ProfilePage(driver);

            //checks username in profile container
            profilePage.VerifyTextboxes();
            Thread.Sleep(2000);
            //enters firstname and last name
            profilePage.EnterFirstAndLastName("John", "Sanders");
            //clicks on home link
            navControl.GotoHome();
            Thread.Sleep(2000);
            //verifies first and last name in home page profile container
            profilePage.VerifyFullNameInHome("John ", "Sanders");
            //clicks on profile link
            navControl.GotoProfile();
            //resets to original value
            profilePage.ResetToOriginal();
        }
Пример #2
0
        [TestCase("user", "password")] //enters valid username and password
        public void TestUserNameInProfileContainer(string user, string password)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Explore page object
            ProfilePage profilePage = new ProfilePage(driver);

            //checks username in profile container
            profilePage.VerifyUserName("user");
        }