Toothless
Toothless

Reputation: 369

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

What is the difference between the functionality of

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

Upvotes: 2

Views: 4079

Answers (1)

actc
actc

Reputation: 682

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

Upvotes: 9

Related Questions