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.