I have tried these:
//descendant::span[@class='foo'][index]
-> works great to identify all but the first one (when i try the index
= 1 it returns all the spans)
//span[@class='foo'][index]
-> only works for index = 1 and brings all spans instead of the first
one
i wanted something like that instead of the full path (like //html/
body/div[1]/span )