 listItems.Length.ShouldBe(tasksInDatabase.Count);

        //Check if returned list items are same those in the database
        foreach (var listItem in listItems)
        {
            var header = listItem.QuerySelector(&quot;.list-group-item-heading&quot;);
            var taskTitle = header.InnerHtml.Trim();
            tasksInDatabase.Any(t =&gt; t.Title == taskTitle).ShouldBeTrue();
        }</strong>
    }
}</pre>

<p>You can check the HTML deeper and in more detailed. But in most cases, checking t