0

Here what is the meaning of "." in the given xpath:

//a[contains(.,'Java SE 8')]
Word Rearranger
  • 1,306
  • 1
  • 16
  • 25
Suv
  • 1
  • 1

1 Answers1

0

The . is similar to the text() attribute, but the . does not handle a case where another child element appears inside the element with the text "Java SE 8".

This thread explains in much more detail: XPath: difference between dot and text()

CEH
  • 5,701
  • 2
  • 16
  • 40
  • does it also work for "normalize-space( )" ? – Suv Nov 14 '19 at 05:41
  • Yes, you can use normalize-space(), the same concept applies. There's a good explanation about that here: https://stackoverflow.com/questions/5992177/what-is-the-difference-between-normalize-space-and-normalize-spacetext – CEH Nov 14 '19 at 15:29