I have elements that can be in one of two state class="icon"
or class="icon active"
.
I thought that $browser.element(:class => /^icon$/).click
would click the first button that isn't active but it just clicks the first one it finds regardless of whether or not it also contains "active."
Is the regex wrong? Or better yet, is there a non-regex way of doing it?