May-18-2021, 09:22 AM
but how to do that when interacting with Selenium in webautomation? let's say I want to loop throug a list of elements and click on each element in the list. In that case I need to feed a index in an element path, but I cannot find a way to do it.
contents = driver.find_element_by_id("searchResultTable").find_elements_by_tag_name("tr") for inda, content in enumerate(contents): print(driver.find_element_by_id('searchResultTable').find_elements_by_tag_name('tr')[f'{inda}'].find_elements_by_tag_name('td')[7].text)