コード例 #1
0
        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);
        }