/// <inheritdoc />
        protected override string GetAttributeValueImpl(string attributeName)
        {
            switch (attributeName.ToLowerInvariant())
            {
            case "url":
                return(Url);

            case "href":
                return(Url);

            default:
                return(_frameElement.GetAttributeValue(attributeName));
            }
        }
        public string GetAttributeValue(string attributename)
        {
            if (frameElement == null)
            {
                IHTMLElement2 element = GetFrameElement("FRAME");
                if (element == null)
                {
                    element = GetFrameElement("IFRAME");
                }

                if (element == null)
                {
                    throw new WatiNException("element shouldn't be null");
                }

                frameElement = new Element(DomContainer, DomContainer.NativeBrowser.CreateElement(element));
            }
            return(frameElement.GetAttributeValue(attributename));
        }
Exemple #3
0
 private bool HasAttribute(WatiN.Core.Element element, string attributeName, string attributeValue)
 {
     return(element.GetAttributeValue(attributeName) == attributeValue);
 }