2

What is the difference between the functionality of

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

albert
  • 8,285
  • 3
  • 19
  • 32
Toothless
  • 359
  • 3
  • 7
  • 17
  • 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) – fabdurso Dec 01 '16 at 15:46

1 Answers1

9

. 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
  • 672
  • 1
  • 9
  • 23