Elements indexing in xpath starts from 1
Also locators like //node[x] might be confusing, because they are not going to select the x-th element in the tree, but rather each x-th element in the hierarchy. Usually, what users want could be achieved by adding parentheses: (//node)[x]
Elements indexing in xpath starts from 1 Also locators like
//node[x]
might be confusing, because they are not going to select the x-th element in the tree, but rather each x-th element in the hierarchy. Usually, what users want could be achieved by adding parentheses:(//node)[x]