I see your point, but you could just use: (By.CSS_SELECTOR, 'a[href*="city"]')
This would not depend on the index