So in last article we have seen how to locate the WebElement using four locators and those are Name, Id, Partial Link Text and Link Text. Now in this article we are going to see the remaining four locators. Let’s start looking at them one by one.
Locating element By Xpath:
Xpath functions are very useful functions, it help to identify the Elements from its root node as well as from anywhere in the page. As HTML can be an execution of XML (XHTML), Selenium clients can use this amazing language to target WebElement in their web applications. XPath goes beyond (and additionally supporting) the straightforward techniques for situating by id or name attributes, and opens up a wide range of new conceivable outcomes, for example, finding the third checkbox on the page.