SelectorsHub: An XPath Guide for beginners!!

SelectorsHub is the best place to learn about XPath. It suggest all possible syntax, siblings, parents, ancestors etc which makes easy to learn all these concepts. If we make a mistake while writing xpath then it suggest what syntax error is there in the xpath.

  • Just type // and it will suggest the right syntax.


 
  • Just type square bracket [ and it will suggest all the possible attributes and text combinations with correct format both for xpath and cssSelector.


  • To get all possible following-sibling of the inspected element, just type β€œfo” and there you go πŸ™‚

  • To get all possible descendant of the inspected element, just type β€œde” and there you go πŸ™‚


  • To get all possible ancestor of the inspected element, just type β€œan” and there you go πŸ™‚


  • To get all possible preceding-sibling of the inspected element, just type β€œpr” and there you go πŸ™‚


 
  • To get the correct xpath syntax for SVG element, just type // and there you go πŸ™‚


  • To write cssSelector with id, just type # and it will suggest you correct cssSelector and in single click complete your cssSelector.


  • To write cssSelector using class, just type dot . and it will suggest you the correct cssSelector with class and you can complete it in single click.


2. Error message with the missing elements

  • Shows the invalid Selector type along with the proper error message like what is missing in selector.


Leave a Comment

Your email address will not be published. Required fields are marked *