An HTML tag. This class performs some of the magic that allows NUnitAsp to construct testers before pages are loaded and to have testers change as the current page changes.

When using the methods on this class, check the API documentation before caching the results. The API of this class may change in future releases.

Inheritance: ControlTester
Exemplo n.º 1
0
        /// <summary>
        /// For NUnitAsp's test suite only.
        /// </summary>
        public static HtmlTagTester TestInstance(string htmlPage, string xpath)
        {
            HtmlTagTester instance = new HtmlTagTester();

            instance.pageForTestingOnly = new XmlDocument();
            instance.pageForTestingOnly.LoadXml(htmlPage);
            instance.xpath       = xpath;
            instance.description = htmlPage;
            return(instance);
        }
Exemplo n.º 2
0
        /// <summary>
        /// For NUnitAsp's test suite only.
        /// </summary>
        public static HtmlTagTester TestInstance(string htmlPage, string id, string description)
        {
            HtmlTagTester instance = new HtmlTagTester();

            instance.pageForTestingOnly = new XmlDocument();
            instance.pageForTestingOnly.LoadXml(htmlPage);
            instance.idForTestingOnly = id;
            instance.description      = description;
            return(instance);
        }
Exemplo n.º 3
0
        private HtmlTagTester[] ChildrenByXPath(string xpath, string description)
        {
            XmlNodeList children = Element.SelectNodes(xpath);

            HtmlTagTester[] result = new HtmlTagTester[children.Count];
            for (int i = 0; i < children.Count; i++)
            {
                result[i] = new HtmlTagTester((XmlElement)children[i], description + " #" + i + " of " + Description);
            }
            return(result);
        }
Exemplo n.º 4
0
 private HtmlTagTester[] ChildrenByXPath(string xpath, string description)
 {
     XmlNodeList children = Element.SelectNodes(xpath);
     HtmlTagTester[] result = new HtmlTagTester[children.Count];
     for (int i = 0; i < children.Count; i++)
     {
         result[i] = new HtmlTagTester((XmlElement)children[i], description + " #" + i + " of " + Description);
     }
     return result;
 }
Exemplo n.º 5
0
 /// <summary>
 /// For NUnitAsp's test suite only.
 /// </summary>
 public static HtmlTagTester TestInstance(string htmlPage, string xpath)
 {
     HtmlTagTester instance = new HtmlTagTester();
     instance.pageForTestingOnly = new XmlDocument();
     instance.pageForTestingOnly.LoadXml(htmlPage);
     instance.xpath = xpath;
     instance.description = htmlPage;
     return instance;
 }
Exemplo n.º 6
0
 /// <summary>
 /// For NUnitAsp's test suite only.
 /// </summary>
 public static HtmlTagTester TestInstance(string htmlPage, string id, string description)
 {
     HtmlTagTester instance = new HtmlTagTester();
     instance.pageForTestingOnly = new XmlDocument();
     instance.pageForTestingOnly.LoadXml(htmlPage);
     instance.idForTestingOnly = id;
     instance.description = description;
     return instance;
 }