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.
<a href="#" class="classA classB">click me</a>
At the moment, the way worked is something like following.
find('.classA', :text=>"click me").click
But I wanna select the element from the names of the two classes like this
find('a.classA.classB').click
click_on('a.classA.classB')
I know we can get javascript code fired, but this is not smart.
page.execute_script('$("a.classA.classB").click()')