|
Project Information
Links
|
The purpose of the project is to create an easy way to create xpath expressions for verifying the presence of elements in a document. Expressions can be created based on attributes, parents, siblings, children, contained text and exact text. More features will be supported in the near future. Examples: XPathFinder.Find.Tag("a").With.Parent("div").With.Parent("div").ToXPathExpression();
XPathFinder.Find.Tag("a").Containing("Home Page").ToXPathExpression();
XPathFinder.Find.Tag("div").With.Attribute("class","SomeCssClass").ToXPathExpression();
XPathFinder.Find.Tag("a").With.Attribute("href", "http://test.test.com").ToXPathExpression();
XPathFinder.Find.Tag("a").With.Text("Test").ToXPathExpression();
XPathFinder.Find.Tag("div").With.Attribute("class", "myClass").And.Attribute("attr1", "test1").And.Attribute("attr2","test2").ToXPathExpression();
string xpath = XPathFinder.Find.Tag("div").With.Attribute("id").Containing("_txtUserName").ToXPathExpression();
string xpath = XPathFinder.Find.Tag("a").With.Attribute("href", "http://www.test.com").And.Attribute("id").Containing("_lnkHome").ToXPathExpression();
Check out these article for more information on xpathitup Terms of Use This library is free software; you can redistribute it and/or This library is distributed in the hope that it will be useful, You should have received a copy of the GNU General Public License |