Unable to select nth element anywhere (solved)


#1

This XPath works:

//a[contains(@class, '_42ft _42fu')]

This does not:

(//a[contains(@class, '_42ft _42fu')])[2]

Or am I doing it wrong? Found the answer below:

xpath=(//a[contains(@class, '_42ft _42fu')])[2]