public void ShouldNotForceTagNameOnJSElementWhenTagNameIsAstrisk()
        {
            // GIVEN
            var elementCollection = new WrappedJSElementCollection(new MockClientPort(), "container");

            // WHEN
            var elements = elementCollection.GetElementsByTag("*");

            // THEN
            var element = (wrappedJSElement) elements.First();
            Assert.That(element.AttribCache.ContainsKey("tagName"), Is.False, "tagName shouldn't be in the cache");
        }
        public void ShouldNotForceTagNameOnJSElementWhenTagNameIsAstrisk()
        {
            // GIVEN
            var elementCollection = new WrappedJSElementCollection(new MockClientPort(), "container");

            // WHEN
            var elements = elementCollection.GetElementsByTag("*");

            // THEN
            var element = (wrappedJSElement)elements.First();

            Assert.That(element.AttribCache.ContainsKey("tagName"), Is.False, "tagName shouldn't be in the cache");
        }
        public void ShouldForceTagNameOnJSElementWithoutAskingTheBrowserWhenGetElementsByTagIsCalled()
        {
            // GIVEN
            var elementCollection = new WrappedJSElementCollection(new MockClientPort(), "container");

            // WHEN
            var elements = elementCollection.GetElementsByTag("myTestTagName");

            // THEN
            var element = (wrappedJSElement) elements.First();
            Assert.That(element.AttribCache.ContainsKey("tagName"), "Expected cached tagName");
            Assert.That(element.AttribCache.ContainsValue("myTestTagName"), "Expected tagName 'myTestTagName' in cache");
        }
        public void ShouldForceTagNameOnJSElementWithoutAskingTheBrowserWhenGetElementsByTagIsCalled()
        {
            // GIVEN
            var elementCollection = new WrappedJSElementCollection(new MockClientPort(), "container");

            // WHEN
            var elements = elementCollection.GetElementsByTag("myTestTagName");

            // THEN
            var element = (wrappedJSElement)elements.First();

            Assert.That(element.AttribCache.ContainsKey("tagName"), "Expected cached tagName");
            Assert.That(element.AttribCache.ContainsValue("myTestTagName"), "Expected tagName 'myTestTagName' in cache");
        }