Skip to main content

Posts

Showing posts from September, 2019

XPath for Selenium WebDriver

How to create Xpath locators...? What are the different types of XPath? There are two kinds of XPath expressions- Absolute XPath   - The XPath expressions created using absolute XPaths begins the selection from the root node. These expressions either begin with the '/' or the root node and traverse the whole DOM to reach the element. Relative XPath   - The relative XPath expressions are a lot more compact and use forward double slashes '//'. These XPaths can select the elements at any location that matches the selection criteria and doesn't necessarily begin with the root node. The ways of finding dynamic elements using XPath... What is an XPath? An XPath can be defined as a query language used for navigating through the XML documents in order to locate different elements. The basic syntax of an XPath expression is:-  //tag[@attributeName='attributeValues'] the different elements in the Xpath expression syntax - tag , attribute and at