How to click automatically on "Content" button How to click automatically on "Content" button selenium selenium

How to click automatically on "Content" button


Try to use the following code:

driver.find_element_by_css_selector(".search-vertical-filter__filter-item-button.button-tertiary-medium-muted").click()

Hope it helps you!


As per the HTML provided to click on the button with text as Content you can use the following line of code :

driver.find_element_by_xpath("//button[@class='search-vertical-filter__filter-item-button button-tertiary-medium-muted' and normalize-space()='Content']").click()