QaMantra: What is Difference between Absolute and Relative Xpath

What is Difference between Absolute and Relative Xpath

Absolute Path

The Path Which Locate the WebElement from Root Node To Required Child Node ,FireFox and Chrome Browser By default generates a Absolute Xpath or CSS Path .


How To generate a Absolute Xpath in Chrome Browser :

To generate a Absolute Xpath in Chrome Browser ,We Have To Follow Some Steps

  • Open Chrome Browser 
  • Navigate To Application Page Element for User have to create Absolute path
  • Right Click on Element and Select option 'Inspect'

Absolute Path -1


As user click on Inspect Link it will open a Console for User Either in bottom or in Left Side Panel

  

Absolute Path -2


  • Right click on Blue Highlighted Source Code and Go To Option  'Copy' and select Sub-Option 'Copy as XPATH'   or 'Copy as CSS Selector' .

Absolute Path -3

  • Enter Keyword 'CTRL +F' and Paste Copy Xpath in Search Box

Absolute Path -4


  • Similar Thing You Can Perform in Firefox as well Without FirePath and Firebug
     
Note : Remaining Article of Relative Path Coming Soon




































































































No comments: