dot(.) 在 selenium 的 xpath 中是什么意思? [英] What does dot(.) mean in the xpath of selenium?
本文介绍了dot(.) 在 selenium 的 xpath 中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
.//input[@id='stack']
和 //input[@id='stack']
推荐答案
.
始终代表当前元素.因此,您的第一个语句查找实际元素下方的所有 ,而后者全局查找所有具有 id 'stack' 的输入元素.
.
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'.
这篇关于dot(.) 在 selenium 的 xpath 中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文