XPath for beginners | Selenium Automation Testing - Part 1

Hey Guys, 

"XPath for beginners" articles are authored by our guest Megha Kharbanda. These awesome tutorials will help you to understand xpath from scratch.  

Part 1: About x-path and its basic syntax:

X-Path is used to navigate through web elements and attributes in an XML Document. From automation testing perspective (especially with selenium), xpath helps in identifying the web elements.

X-Paths can be created by:


  • Basic Syntax
  • Using AND & OR
  • Contains ()
  • Starts – With ()
  • Text ()
  • Following
  • Preceding
  • Ancestor