I am trying to create a custom HTML control for the h3 tag and am having trouble. I'm using the thread http://www.telerik.com/forums/custom-web-controls for a reference but am unable to get it to work. I'm using the Find.ByAttributes<HtmlH3>("class=~someclass") but am not receiving only h3 elements. Here is my code:
public class HtmlH3 : HtmlControl
{
ArtOfTest.Common.IFindExpression _locatorExpression;
public HtmlH3(Element element) : base(element)
{
_locatorExpression = new HtmlFindExpression("tagname=h3");
}
public HtmlH3() : base()
{
_locatorExpression = new HtmlFindExpression("tagname=h3");
}
public override ArtOfTest.Common.IFindExpression LocatorExpression
{
get { return _locatorExpression; }
}
}
Help would be greatly appreciated. Thanks