2

What is the difference between the functionality of

.//input[@id='stack'] and //input[@id='stack']

albert
  • 7,283
  • 3
  • 16
  • 31
Toothless
  • 339
  • 2
  • 7
  • 16
  • 1
    Possible duplicate of [What is the difference between absolute and relative xpaths? Which is preferred in Selenium automation testing?](http://stackoverflow.com/questions/27183353/what-is-the-difference-between-absolute-and-relative-xpaths-which-is-preferred) – hellofabrizio Dec 01 '16 at 15:46

1 Answers1

8

. always represents the current element. So your first statement looks for all <input id='stack'> beneath the actual element while the latter globally looks for all input elements with the id 'stack'.

actc
  • 834
  • 1
  • 9
  • 22