public void Can_Create_A_Basic_Post() { NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test post title").WithBody("Hi this is the body").Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "This is the test post title", "Title did not match new post."); }
public static void CreatePost() { NewPostPage.GoTo(); //this will generate some dummy title. PreviousTitle = CreateTitle(); PreviousBody = CreateBody(); NewPostPage.CreatePost(PreviousTitle).WithBody(PreviousBody).Publish(); }
public void Can_Edit_A_Page() { ListPostsPage.GoTo(ListPostsPage.PostType.Page); // general purpose class this will work for both posts and pages ListPostsPage.SelectPost("Sample Page"); // or you could add an index [0] or [1] for the 1st or 2nd post of that page //Assert.IsTrue(NewPostPage.IsInEditMode(), "Wasn't in edit mode"); Assert.AreEqual("Edit Page Add New", NewPostPage.Header(), "Header did not match"); Assert.AreEqual("Sample Page", NewPostPage.Title, "Title did not match"); }
public void CanCreateABasicPost() { Wordpress.StartApplication(); NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test post title").WithBody("Hi, this is the body").Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "This is the test post title", "Title did not match"); }
public void CanCreateBasicPost() { NewPostPage.GoTo(); NewPostPage.CreatePost("Test post title").WithBody("Post body").Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "Test post title", "Title did not match the test post"); }
public static void CreatePost() { NewPostPage.GoTo(); PreviousTitle = CreateTitle(); PreviousBody = CreateBody(); NewPostPage.CreatePost(PreviousTitle).WithBody(PreviousBody).Publish(); }
public void CanEditAPage() { Wordpress.StartApplication(); ListPostsPage.GoTo(PostType.Page); ListPostsPage.SelectPost("Sample Page"); Assert.IsTrue(NewPostPage.IsInEditMode(), "Page not in Edit Mode."); Assert.AreEqual("Sample Page", NewPostPage.Title, "Title did not match"); }
public void CanCreateABasicPost() { LoginPage.GoTo(); LoginPage.LoginAs("LOGIN").WithPassword("PASSWORD").Login(); NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test post title"). WithBody("Hi, this is the body"). Publish(); }
public void Can_Edit_A_Page() { // Pages are just a type of Post - so creating a general purpose class to work with // posts and pages, and sending in a type to differentiate ListPostsPage.GoTo(PostType.Page); ListPostsPage.SelectPost("Sample Page"); Assert.IsTrue(NewPostPage.IsInEditMode(), "Wasn't in edit mode"); Assert.AreEqual("Sample Page", NewPostPage.Title, "Title did not match"); }
public void Can_Create_A_Basic_Post() { NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test Post Title, Again") .WithBody("Hi, This is the body of the post!") .Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "This is the test Post Title, Again", "Title did not match new post"); }
public void Can_Create_A_Basic_Post() { LoginPage.GoTo(); LoginPage.LoginAs("wkryszax").WithPassword("X011T@phbA$TQ2KFZh").Login(); NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test post title").WithBody("Hi, this is the body").Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "This is the test post title", "Title did not match new post"); }
public void Can_Edit_A_Page() { LoginPage.GoTo(); LoginPage.LoginAs("admin").WithPassword("password").Login(); ListPostsPage.GoTo(PostType.Page); ListPostsPage.SelectPost("Sample Page"); Assert.IsTrue(NewPostPage.IsInEditMode(), "Wasn't in edit mode"); Assert.AreEqual("Sample Page", NewPostPage.Title, "Title did not match"); }
public void Can_Create_A_Basic_Post() { LoginPage.GoTo(""); LoginPage.LoginAs("trebevic_admin").WithPassword("baG!Rf7yp6jWhkl&wP").Login(); ListPostsPage.GoTo(PostType.Page); ListPostsPage.SelectPost("Sample Page"); Assert.IsTrue( NewPostPage.IsInEditMode(), "Wasn't in edit mode"); Assert.AreEqual("Sample Page", NewPostPage.Title, "Title did not match"); }
public void Can_Create_A_Basic_Post_Test() { LoginPage.GoTo(); LoginPage.LoginAs("root").WithPassword("novell").Login(); NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test post title") .WithBody("This is the bod of new post") .Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "This is the test post title", "Title did not match with new post title"); }
public void Can_Create_A_Basic_Post() { LoginPage.GoTo("https://trebevic.net/wp-login.php?itsec-hb-token=treblogin"); LoginPage.LoginAs("trebevic_admin").WithPassword("baG!Rf7yp6jWhkl&wP").Login(); NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test post title") .WithBody("Hi, this is the body") .Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "This is the test post title", "Title did not match new post"); }
public void Can_Create_Basic_Post() { // create post contents - title, body NewPostPage .CreatePost("This is the post test title") .WithBody("Hi, this is the body") .Publish(); // create post NewPostPage.GoToNewPost(); // check if the post has been created and that the title of the post equals the provided one Assert.AreEqual(PostPage.Title, "This is the post test title", "Title did not match a new post"); }
public void Can_Edit_Page() { // navigate to the list post page ListPostPage.GoTo(PostType.Page); // select page/post to select ListPostPage.SelectPost("Career"); // verify edit mode Assert.IsTrue(NewPostPage.IsInEditMode(), "Was not in edit mode"); // verify we are at the page/post to edit Assert.AreEqual("Career", NewPostPage.Title, "Title did not match"); }
public void Can_Create_A_Basic_Post() { LoginPage.GoTo(); LoginPage.LoginAs("admin").WithPassword("password").Login(); NewPostPage.GoTo(); NewPostPage.CreatePost("This is the test post title") .WithBody("Hi, this is the body.") .Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.Title, "This is the test post title", "Title did not match new post."); }
public void CanEditAPage() { LoginPage.Goto(); LoginPage .LoginAs("selenium_user") .WithPassword("q*y12rVMn7NJ8Jjxw@") .Login(); ListPostsPage.GoTo(PostType.Page); ListPostsPage.SelectPost("Sample Page"); Assert.True(NewPostPage.IsInEditMode(), "Isn't in Edit mode"); Assert.Equal("Sample Page", NewPostPage.Title); }
public void Can_Edit_A_Page() { ListPostsPage.GoTo(PostType.Page); ListPostsPage.SelectPost("Sample Page"); Assert.IsTrue(NewPostPage.IsInEditMode(), "Wasn't in edit mode"); Assert.AreEqual(NewPostPage.Title, "Sample Page", "Title did not match"); //NewPostPage.GoTo(); //NewPostPage.CreatePost("This is the test post title").WithBody("Hi, this is the body...").Publish(); //NewPostPage.GotoNewPost(); //Assert.AreEqual(PostPage.Title, "This is the test post title", "Title did not match new post"); }
public void Can_Edit_A_Page() { #region Manual test case //Go to login page //Login as “admin” user with correct password “ha tran” //Click Login button //Hover mouse on the “Pages” menu on the left navigation panel //Click “All Pages” menu //Click on the page post having title “Sample Page” //Verify that the page post is edit mode by checking visibility of the “View Page” button //Verify that the page title is “Sample Page” #endregion ListPostsPage.GoTo(PostType.Page); ListPostsPage.SelectPost("Sample Page"); Assert.IsTrue(NewPostPage.IsInEditMode(), "Wasn't in edit mode"); Assert.AreEqual("Sample Page", NewPostPage.Title, "Title didn't match"); }
public void Can_create_a_new_post() { string title = DateTime.Now.ToString(); //ConfigurationManager.AppSettings["newTitle"]; string body = ConfigurationManager.AppSettings["postBody"];; NewPostPage.Goto(); NewPostPage.createPost(title) .withBody(body) .Publish(); NewPostPage.GoToNewPost(); //Assert.AreEqual( PostPage.Title , title+" - iBlog","Not the new post!"); string titleString = Driver.Instance.FindElement(By.CssSelector(".site-title>a")).Text; Assert.AreEqual(Driver.Instance.Title, title + " – " + titleString); }
public void CanCreateABasicPost() { LoginPage.Goto(); LoginPage .LoginAs("selenium_user") .WithPassword("q*y12rVMn7NJ8Jjxw@") .Login(); NewPostPage.GoTo(); NewPostPage .CreatePost("This is a test post title") .WithBody("Hi, this is the body") .Publish(); NewPostPage.GoToNewPost(); Assert.Equal("This is a test post title", PostPage.Title); // Assert.Equal(PostPage.Body, "Hi, this is the body"); }
public void Can_Search_Posts() { // Create new post NewPostPage.GoTo(); NewPostPage.CreatePost("Searching posts, title") .WithBody("Seraching posts, body") .Publish(); // Go to lists posts ListPostsPage.GoTo(PostType.Posts); // Search for the post ListPostsPage.SearchForPost("Searching posts, title"); // Check that posts shows up in the results Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle("Searching posts, title")); // Cleanup (Trash post) ListPostsPage.TrashPost("Searching posts, title"); }
public void WhenIEnterMyPost() { //var chrome = ScenarioContext.Current["browser"] as ChromeDriver; //WebBrowser.CurrentChromeWindow.FindElement(By.Id("title")).SendKeys("Test Title"); //WebBrowser.CurrentChromeWindow.SwitchTo().Frame("content_ifr"); //WebBrowser.CurrentChromeWindow.SwitchTo().ActiveElement().SendKeys("Test Content"); //WebBrowser.CurrentChromeWindow.SwitchTo().DefaultContent(); //Thread.Sleep(3000); //WebBrowser.CurrentChromeWindow.FindElement(By.Id("publish")).Click(); //var contentFrame = firefox.FindElement(By.Id("content_ifr")); //contentFrame.SendKeys("Test Content"); //firefox.SwitchTo().Frame(firefox.FindElement(By.Id("content_ifr")).SendKeys("Test Content")); //firefox.FindElement(By.XPath(".//*[@id='tinymce']/p")).SendKeys("Test Content"); //Thread.Sleep(10); //chrome.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); //WebDriverWait publishButtonWait = new WebDriverWait(chrome, TimeSpan.FromSeconds(2)); //ChromeWebElement publishButton = publishButtonWait.until(ExpectedConditions.ElementToBeClickable(By.Id("publish"))); //chrome.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); //Thread.Sleep(10); NewPostPage.AddNewPost(); }
public void Can_Create_A_Basic_Post() { #region Manual test case //Go to login page //Login as “admin” user with correct password “ha tran” //Click Login button //Click Posts menu on the left nagivation panel //Click Add New button //Enter the post title “This is the post title” //Enter the post body “Hi, This is the post body” //Click “Publish…” button //Click “Publish” button //Click “View Post” button //Verify that the post is created by checking the title “This is the post title” #endregion Manual test case NewPostPage.GoTo(); NewPostPage.CreatePost("This is the post title") .WithBody("Hi, This is the post body") .Publish(); NewPostPage.GoToNewPost(); Assert.AreEqual(PostPage.NewPostTitle, "This is the post title", "Title did not match new post."); }
public void Added_Posts_Show_Up() { // Go to posts, get post count, store ListPostsPage.GoTo(ListPostsPage.PostType.Posts); ListPostsPage.StoreCount(); // Add a new post NewPostPage.GoTo(); NewPostPage.CreatePost("Added posts show up, title") .WithBody("Added posts show up, body") .Publish(); // Go to posts, get new post count ListPostsPage.GoTo(ListPostsPage.PostType.Posts); Assert.AreEqual(ListPostsPage.PreviousPostCount + 1, ListPostsPage.CurrentPostCount, "Count of posts did not increase"); // Check for added post Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle("Added posts show up, title")); // Trash post (clean up) ListPostsPage.TrashPost("Added posts show up, title"); Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Couldn't trash post"); }
public NewPostTransactions() { this.page = new NewPostPage(); }