I have HTML that (somehow) includes two elements with the same ID. Only one of them is clickable, and to identify the one I want to click, I am using:
driver.find_elements_by_id('someID')[1]
Now I want to convert this to an explicit wait. If there was only one element with that ID (or any selector), I would do this:
WebDriverWait(driver, 2).until(EC.element_to_be_clickable((By.ID, 'someID')))
How do I convert that statement to identify the second item with that ID, not the first? The alternative is to use the full xpath of the element, but I thought finding the second element with the ID would be more stable.