What does dot(.) mean in the xpath of selenium?

后端 未结 1 1074
心在旅途
心在旅途 2020-12-21 12:43

What is the difference between the functionality of

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

相关标签:
1条回答
  • 2020-12-21 13:07

    . 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'.

    0 讨论(0)
提交回复
热议问题