TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Selenium

Absolute and Relative XPath Expressions

Overview

In this tutorial, we will learn about Absolute and Relative XPath Expressions. These are the mechanisms to identify the element in the document.

XPath is a query language to identify elements in the documents. Types of XPath expressions are:

  • Absolute XPath Expression
  • Relative XPath Expression

Absolute XPath

An absolute XPath is the complete path from the root node of the document. The absolute path starts with ‘/’

For Example:

/html/body/div/input

Relative XPath

The relative XPath starts with the ‘//’ and search for the element relative from the current node.

For Example:

//input

Related Posts

Windows 10 Settings

Selenium /

Add Microsoft Webdriver on Windows OS

Download Selenium Components

Selenium /

Getting Started with Selenium Webdriver

LambdaTest Testing Cloud SaaS Platform

Selenium /

LambdaTest – Testing Cloud SaaS Platform

Selenium /

Selenium 3.0 and Mozilla GeckoDriver

SauceLabs Website

Selenium /

Run an Example Test on SauceLabs

‹ What are the differences between QTP and Selenium?› Difference between findElements and findElement

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version