×
☰ See All Chapters

xpath in Puppeteer

xpath is the xml path of an element in the html tree along with certain conditions and attributes forming an expression. xpath is one of the locator in puppteer using which we identify objects or elements when we are unable to locate the elements by using ID, class, and tagname. If elements are not static in page and dynamically changing then xpath locator is the useful locator.

xpath are of 2 types:

  1. Absolute xpath         

  2. Relative xpath 

Click on the below link to read that chapter

Absolute xpath in Puppeteer

Relative xpath in Puppeteer

Puppeteer relative xpath by attribute

Puppeteer relative xpath using text function

Puppeteer relative xpath using contains function

Puppeteer relative xpath using starts with function

Independent and dependent concept in xpath

Group index in xpath

Xpath axes

 


All Chapters
Author