예제 #1
0
        public void TestMethod_BlogDeveloper()
        {
            string _Url;
            string _Uname;
            string _Password;
            string _remember;
            string _Club;
            string _BlogTitle;
            string _BlogDescription;
            string _BlogTag;

            _Url             = TestContext.DataRow["url"].ToString();
            _Uname           = TestContext.DataRow["Username"].ToString();
            _Password        = TestContext.DataRow["Password"].ToString();
            _remember        = TestContext.DataRow["Rememberme"].ToString();
            _Club            = "Developer";
            _BlogTitle       = TestContext.DataRow["Title"].ToString();
            _BlogDescription = TestContext.DataRow["Description"].ToString();
            _BlogTag         = TestContext.DataRow["Tags"].ToString();
            _BlogTitle       = "Developer " + _BlogTitle;
            _BlogTitle       = CommonFunctions.GenarateRandom(_BlogTitle);


            //Login to the system
            myManager.ActiveBrowser.NavigateTo(_Url);
            CommonFunctions.HandleSpashScreen(myManager, myManager.ActiveBrowser);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            CommonFunctions.Login(myManager, myManager.ActiveBrowser, _Uname, _Password);
            Thread.Sleep(7000);

            //Navigate to blogs
            string navigateURL;

            navigateURL = _Url + "/home-blogs/";
            Thread.Sleep(5000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();

            //AddNewBlog
            NewBlogCommon objNewBlog = new NewBlogCommon();

            objNewBlog.CreateNewBlog(navigateURL, myManager.ActiveBrowser, myManager, _BlogTitle, _BlogDescription, _Club, _BlogTag);

            //Validate the blog in Activity stream
            CommonFunctions.ValideActivityStream(myManager, myManager.ActiveBrowser, _Url, _BlogTitle, _Club);
            //Validate the blog in blog page
            CommonFunctions.ValidateBlog(myManager, _BlogTitle);

            //Logout
            CommonFunctions.Logout(myManager, myManager.ActiveBrowser);
            ObjLoginLanguage login = new ObjLoginLanguage(myManager);

            login.loginLink.Wait.ForExists(5000);

            //myManager.Dispose();
        }
예제 #2
0
        public void TestMethod_BlogCustomer()
        {
            //Read the datasheet
            ReadData();

            //Login to the system
            myManager.ActiveBrowser.NavigateTo(_Url);
            CommonFunctions.HandleSpashScreen(myManager, myManager.ActiveBrowser);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            CommonFunctions.Login(myManager, myManager.ActiveBrowser, _Uname, _Password);
            Thread.Sleep(7000);

            //Navigate to blogs
            string navigateURL;

            navigateURL = _Url + "/home-blogs/";
            Thread.Sleep(5000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();

            //AddNewBlog
            NewBlogCommon objNewBlog = new NewBlogCommon();

            objNewBlog.CreateNewBlog(navigateURL, myManager.ActiveBrowser, myManager, _BlogTitle, _BlogDescription, _Club, _BlogTag);

            //Validate the blog in Activity stream
            CommonFunctions.ValideActivityStream(myManager, myManager.ActiveBrowser, _Url, _BlogTitle, _Club);
            //Validate the blog in blog page
            CommonFunctions.ValidateBlog(myManager, _BlogTitle);

            //addcomment
            objNewBlog.addcomment(myManager.ActiveBrowser, myManager, _BlogComment);
            //validate comment
            CommonFunctions.ActivityStreamCommentsValidator(myManager, myManager.ActiveBrowser, _Url, _BlogComment, _Club);

            //Logout
            CommonFunctions.Logout(myManager, myManager.ActiveBrowser);
            ObjLoginLanguage login = new ObjLoginLanguage(myManager);

            login.loginLink.Wait.ForExists(5000);

            //myManager.Dispose();
        }