# If you want to find element by partial class name you have to use css_selector element = driver.find_element_by_css_selector("div[class^='dx-close-button']") element.click() # You don't need to specify the tag