I am using Python and Selenium to locate and click an element on a web page.
Here is my code:
WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.XPATH, '//*[@id="tab_panel_609"]/div[2]/div/div/div[2]/div/div[2]/div[1]/div/div[2]/div/div/div/li/div'))).click()
It works, but the problem is that the table panel number changes every time I refresh the page.
[@id="tab_panel_???"]
Is there a way to find elements by XPATH while accounting for the changing value?