My favorites | Sign in
Project Hosting will be READ-ONLY Thursday at 3:00pm UTC for up to 3 hours for network maintenance.
Project Home Downloads Wiki Issues Source
Project Information
Members
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

http://www.unit-testing.net/CurrentArticle/How-To-Write-XPath-for-Selenium-Tests.html

http://www.unit-testing.net/CurrentArticle/How-To-Make-Web-Tests-Less-Fragile.html

Terms of Use

This library is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

You should have received a copy of the GNU General Public License

along with this library; if not, write to the Free Software

Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Powered by Google Project Hosting