Esempio n. 1
0
        public void CreatePostContentResize()
        {
            HomePage homePage = new HomePage(this.driver);

            homePage.NavigateTo();

            LoginPage logPage = new LoginPage(this.driver);

            logPage.NavigateTo();
            var loginUser = AccessExcelData.GetTestDataLoging("LoginSuccessfully");

            logPage.FillLoginForm(loginUser);

            homePage.CreatePostLink.Click();

            CreatePost createPage = new CreatePost(this.driver);
            var        postUser   = AccessExcelData.GetTestDataPosts("CreatePostSuccessfuly");

            createPage.NavigateTo();

            Actions builder = new Actions(this.driver);
            var     action  = builder.MoveToElement(createPage.Content)
                              .MoveByOffset((createPage.Content.Size.Width / 2) - 2, (createPage.Content.Size.Height / 2) - 2)
                              .ClickAndHold()
                              .MoveByOffset(300, 300)
                              .Release();

            action.Perform();
            createPage.AssertCreatePageIsDisplayed("Create Article");
            createPage.AssertComtentResizeField(300);
        }
Esempio n. 2
0
        public void CancleButtonFuntionality()
        {
            HomePage homePage = new HomePage(this.driver);

            homePage.NavigateTo();

            LoginPage logPage = new LoginPage(this.driver);

            logPage.NavigateTo();
            var loginUser = AccessExcelData.GetTestDataLoging("LoginSuccessfully");

            logPage.FillLoginForm(loginUser);

            homePage.CreatePostLink.Click();

            CreatePost createPage = new CreatePost(this.driver);
            var        postUser   = AccessExcelData.GetTestDataPosts("CancelButtonTestData").ToString();

            createPage.NavigateTo();
            createPage.Title.SendKeys(postUser);
            createPage.Content.SendKeys(postUser);
            createPage.CancelButton.Click();

            createPage.AssertPostCreationCancelButton("Test Post");
        }
Esempio n. 3
0
        public void WithoutContentPostCreation()
        {
            HomePage homePage = new HomePage(this.driver);

            homePage.NavigateTo();

            LoginPage logPage = new LoginPage(this.driver);

            logPage.NavigateTo();
            var loginUser = AccessExcelData.GetTestDataLoging("LoginSuccessfully");

            logPage.FillLoginForm(loginUser);

            homePage.CreatePostLink.Click();

            CreatePost createPage = new CreatePost(this.driver);
            var        postUser   = AccessExcelData.GetTestDataPosts("CreatePostWithoutContent");

            createPage.NavigateTo();
            createPage.FillCreatePostForm(postUser);

            createPage.AssertErrorMessageForEmptyFields("The Content field is required.");
        }
Esempio n. 4
0
        public void CreatePostSuccessfuly()
        {
            HomePage homePage = new HomePage(this.driver);

            homePage.NavigateTo();

            LoginPage logPage = new LoginPage(this.driver);

            logPage.NavigateTo();
            var loginUser = AccessExcelData.GetTestDataLoging("LoginSuccessfully");

            logPage.FillLoginForm(loginUser);

            homePage.CreatePostLink.Click();

            CreatePost createPage = new CreatePost(this.driver);
            var        postUser   = AccessExcelData.GetTestDataPosts("CreatePostSuccessfuly");

            createPage.NavigateTo();
            createPage.FillCreatePostForm(postUser);

            createPage.AssertSuccessfulPostCreation("Test Post Creation");
        }