Can anybody please tell me what is the difference between // and //* in xpath. Is there any difference?
3 Answers
Source-Xpath Syntax
//* Selects all elements in the document
// Selects nodes in the document from the current node that match the selection no matter where they are
2 Comments
Gourav Shivalkar
//*[@id=’social-media’] Does that means look for id='social-media' on every element.
ratr
That's correct.It would match the condition in all the tags and if you want to search in the current node then you have to use something like //div[@id=’social-media’]