Exemple #1
0
        public void GetIndices()
        {
            HtmlPath path = HtmlPath.Parse("/BODY[0]/DIV[5]/DIV[0]/DIV[1]/TABLE[7]/TBODY[0]/TR[6]/TD[1]");
            var      e    = myDocument.GetElementByPath(path);

            Assert.AreEqual(1, HtmlTable.GetColumnIndex(e));
            Assert.AreEqual(6, HtmlTable.GetRowIndex(e));
            Assert.AreEqual(e, HtmlTable.GetEmbeddingTD(e));
            Assert.AreEqual(e.Parent, HtmlTable.GetEmbeddingTR(e));
        }