I have a website and want to select some element; here is my XPATH expression:
//span[contains(.,"Arbeitsräume")]
which returns two matches. The first match probably comes from this html code piece:
<span class="menu-item-text">
<i class="fa fa-users"></i>
Arbeitsräume
</span>
The second match I do not know. However, I want to select the first match. Therefore I tried:
//span[contains(.,"Arbeitsräume")][1]
which again gave TWO matches. A '0' or a '2' in the bracket returned no matches.
I though a square bracket at the end of the xpath expression lets you select the first, second, ... match, but I might be mistaken.
So how can I select the first, second... XPATH match?