I\'m writing automation code in Capybara with Selenium. I have the following element in my HTML, and I wanna click this element in Capybara.
You can search an element by xpath
xpath
based on your example, seems like the following should work
//div[contains(@class, 'classA') and contains(@class, 'classB')]
You could also use css
css
(:css, ".classA.classB")