예제 #1
0
        private bool CommentIsSet(Comment comment)
        {
            var comments = browser.FindElements(By.CssSelector("li.comment"));

            return(comments.Any(c => c.FindElement(By.ClassName("comment-content")).Text == comment.Text));
        }
예제 #2
0
        private bool AuthorIsSet(Comment comment)
        {
            var comments = browser.FindElements(By.CssSelector("li.comment"));

            return(comments.Any(c => c.FindElement(By.CssSelector("b.fn")).Text == comment.Author));
        }
예제 #3
0
 internal bool HasComment(Comment comment)
 {
     return(AuthorIsSet(comment) &&
            CommentIsSet(comment));
 }