Answers for "absolute and relative xpath"

-1

absolute and relative xpath

Single Slash “/” is used to create XPath with absolute path 
Double Slash “//” is used to create XPath with relative path 
Xpath stands for XML path
-Absolute Xpath: is a direct way to locate an element and
it uses Complete path.

-On the other hand

Relative Xpath: starts from the middle of the
HTML DOM and You can find unique parent node
and simply start from there to element you want. 
Less fragile. Shorter. Never fails to
identify object even though object’s
location changes. It is written directly from
the Web Element using Web Element attribute


Syntax = //tagname[@attribute='value']
Posted by: Guest on December-04-2020

Code answers related to "absolute and relative xpath"

Browse Popular Code Answers by Language