Selenium Tutorial-Xpath Selenium

This Selenium tutorial tells you how to select the xpath for various components of your web application.Xpath is like location of elements of web application.You can write xpath in your own way but use of firebut makes your work very easy.

Free Selenium Tutorials and Videos

Note:  Double click on Selenium training video to fit to screen


Xpaths or locators are unique address for each and every web object.Xpaths can be used with selenium to
perform operations on the object.Each webobject has a unique xpath.
Xpaths are derived from the html paths of the objects. You cna install firebug and on the top of firebug, you can
install firpath. Both are installed as addons on mozilla and description has been provided in the video.

Once you extract the xpath of an object, you can use that object using Selenium. Xpaths are contants. They do not change. If there is a link and the text of the link changes but the position does not change then xpath remains the same. Sometimes xpaths alo vary everytime you refresh the page. For solving this, you need to use javascript functions to handle variable xpaths. Varying xpaths always have a pattern. Please watch the selenium tutorial on varying xpaths for knowing more.