public void Should_add_three_visits()
        {
            new DatabaseTester().Clean();

            var url = "http://localhost:1234/";
            using (var ie = new IE(url))
            {
                ie.Button("submit").Click();
                Thread.Sleep(2000);
                ie.Button("submit").Click();
                Thread.Sleep(2000);
                ie.Button("submit").Click();
                Thread.Sleep(2000);

                ie.ElementsWithTag("hr").Count.ShouldEqual(3);
            }
        }
        public void ParentShouldReturnAnInstanceOfTypeListItemWhenRegisteredWithElementFactory()
        {
            // GIVEN searching for WatiN on Google
            ElementFactory.RegisterElementType(typeof(ListItem));

            using (var ie = new IE("www.google.com"))
            {
                ie.TextField(Find.ByName("q")).TypeText("WatiN");
                ie.Button(Find.ByName("btnG")).Click();

                // Get the first li item on the page
                var firstListItem = ie.ElementsWithTag("li")[0];
                
                // get its first child (assuming it has a child)
                var firstChild = ((IElementContainer)firstListItem).Elements[0];

                // WHEN getting the parent of the child we should get the listitem again
                var parentListItem = firstChild.Parent;

                // THEN the returned item should be typed cause ElementFactory knows about ListItem
                Assert.IsInstanceOfType(parentListItem, typeof(ListItem));
            }
        }