I am trying to click on all the buttons on a webpage. I'd like to be able to click them all. webpage i can click on one of them by using css selector
browser.find_element_by_css_selector('li.clickable_area:nth-child(1) > div:nth-child(3)').click()
these are the css selector for the 5 buttons
the 5 buttons follow this pattern:
Button 1: li.clickable_area: nth - child(1) > div:nth - child(3)
Button 2: li.clickable_area: nth - child(2) > div:nth - child(3)
Button 3: li.clickable_area: nth - child(3) > div:nth - child(3)
Button 4: li.clickable_area: nth - child(4) > div:nth - child(3)
Button 5: li.clickable_area: nth - child(5) > div:nth - child(3)
How i can i click them all using css selector without writing a code for each one?
z=browser.find(button1)-->z.click()and so on