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

后端 未结 1 1081
心在旅途
心在旅途 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 beneath the actual element while the latter globally looks for all input elements with the id 'stack'.

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