XPath really made easy editor

XPath is one language, if call it so which is increasingly being used everywhere. Is used from development to testing environment. In the testing fields, its been used as a add on for many testing tools. Consider SoapUI which is used for testing and developing web services. Over here XPath can be used to trace a XML and find out specific words.

In selenium RC, we could use XPath for in java programs to search a image, button text field to find the data we need. Many times it isnt shrwed to write our own XPath scripts, it takes quite a long time. One of the editors I found online is at http://slesinsky.org/brian/code/xpath_checker.html.

This easy to use editor is a add on for mozilla. You can just RIGHT click on a table for example in the HTML to get the XPath query for that.Some of the screen shots are as below :

id=BLOGGER_PHOTO_ID_5255349217003544418

Examples of XPAth queries are :
selenium.click(//input[@type=image]);
selenium.click(//input[@value=Submit]);

These examples are with selenium testing tool

In

Leave a Reply

Your email address will not be published. Required fields are marked *