How To Write XPATH In Selenium WebDriver? (Selenium Course) Lecture - 16

Опубликовано: 30 Октябрь 2024
на канале: Programming Line in English
14
0

In this video tutorial, we are going to learn how to write Xpath in Selenium
WebDriver.

XPath is defined as an XML path. It 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 screenshot.

Types of X-path
There are two types of XPath:
1) Absolute XPath.
It is the direct way to find the element, but the disadvantage of the absolute
XPath is that if there are any changes made in the path of the element then that
XPath gets failed.
The key characteristic of XPath is that it begins with the single forward-slash(/)
, which means you can select the element from the root node.

2) Relative XPath.
It is the direct way to find the element, but the disadvantage of the absolute
XPath is that if there are any changes made in the path of the element then that
XPath gets failed.
For Relative Xpath the path starts from the middle of the HTML DOM structure.
Its start with the double forward-slash (//), which means it can search the
element anywhere at the webpage.
You can starts from the middle of the HTML DOM structure and no need to
write long xpath.

#ProgrammingLine #Rakesh #SeleniumCourse

Video Credits: Abirami
Disclaimer: Thanks Abirami for contributing this video for this channel. I have paid Abirami for doing this video exclusively for this channel.
*******************************************************
Java Course:    • Java Course  
Python Course:    • Python Course  
Software Design Patterns Course:    • Software Design Patterns  
OOPs Course:    • OOPs Course  
NLP Course:    • NLP Course  
Software Interview Tips:    • Software Interview Tips  

Important Links:
Skillshare - Best Online Learning Platform (2 Free Months of Premium Membership): https://programmingline.com/skillshare
Java Course: https://programmingline.com/java-course
Software Design Patterns Course: https://programmingline.com/software-...
Object Oriented Programming (OOPs) Course: https://programmingline.com/oops
Best Books for Software Courses: https://programmingline.com/best-book...
Campus Interview: https://programmingline.com/campus-in...
How to crack the programming aptitude round?: https://programmingline.com/how-to-cr...


*******************************************************

Subscribe my YouTube channels:
► Subscribe    / @programminglineinenglish8654   channel for watching Software Related courses like Java, Software Design Patterns, OOPs, and etc in Telugu.

► Subscribe    / @roadtoinvestment7954   channel for watching Income Tax saving schemes and Stock Market related videos.

► Subscribe    / @rakesh-ms7tn   channel for watching Terrace Gardening Tips, Unboxing products, and Random videos in Tamil, Telugu, and English.

Website: www.programmingline.com
FaceBook page:   / programminglineofficial  
Instagram:   / programmingline  
Twitter:   / programmingline  

*******************************************************