Xpath locator in Selenium WebDriver

In Selenium automation, if the elements are not found by the general locators like id, class, name, etc. then XPath is used to find an element on the web page .

In this tutorial, we will learn about the xpath and different XPath expression to find the complex or dynamic elements, whose attributes changes dynamically on refresh or any operations.

In this tutorial, you will learn-

  • What is XPath?
  • Types of X-path
    • Absolute XPath
    • Relative XPath
  • Basic XPath
  • Contains()
  • Using OR & AND
  • Start-with function
  • Text()
  • XPath axes methods
    • Following
    • Ancestor
    • Child
    • Preceding
    • Following-sibling
    • Parent
    • Self
    • Descendant

What is XPath?

XPath is defined as XML pathIt is a syntax or language for finding any element on the web page using XML path expression. XPath is used to find the location of any element on a webpage using HTML DOM structure. The basic format of XPath is explained below with screen shot.

Screenshot Tutorials/Courses

Download Free Tutorial Xpath locator in Selenium WebDriver


Password : freetuts.download

Related Articles

Leave a Reply

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

Check Also

Back to top button