How To Use XPath in LeanFT | UFT Developer

In this tutorial, I will show you how to use XPath in LeanFT.LeanFT has been officially rebranded as UFT Developer by Miro Focus. It has a very powerful mechanism to identify objects in a test application. It can identify objects by using object properties, CSS Selection, and XPath.In Open source tools, XPath is widely used to identify web objects.LeanFT also supports XPath to identify all kinds of web objects. To know more about XPath expressions and how to create them, please refer to my post on XPath in Selenium WebDriver with Example which is a generic article on XPath and is not specific to a specific automation tool. The core concepts of XPath are the same across all automation tools.

Example of Using XPath in LeanFT | UFT Developer

LeanFT is capable enough to uniquely identify objects using its property. However, there might be some scenarios wherein you would like to use XPath to identify a test object.LeanFT gives us the option to use the XPath of the object along with other properties. Nevertheless, you can also use the only XPath to identify an object as a valid XPath alone is sufficient to identify an object. The following example illustrates how to use XPath in LeanFT.In the following test, the script enters the user credential and presses the login button using XPath of the respective objects.

You can write your own custom XPath if you are well versed in writing XPath or you can take the help of the Object Identification Centre (OIC) to create the descriptive object using XPath Description. During object identification using OIC, you can uncheck all other properties except XPath to create the object using the XPath description.

Using XPATH in LeanFT

You can copy the XPath value in your clipboard and used it in your scripts. To know more about how to use the Object Identification Center please refer to the following posts.

Recommended Posts

Leave a Reply