'click_link' with Selenium finds first match based on substring, ignoring exact matches
Reported by Mike Grafton | January 20th, 2010 @ 09:02 PM
For instance we have two links, one with content "ADD NEW", and one with content "ADD" (in that order in the HTML). If we use 'click_link "ADD"' in our webrat test in Selenium mode, it tries to click the former link ("ADD NEW") - not what we want.
Is it possible to do an exact match first, and then rely on the substring match as a backup?
We think we could patch this pretty easily in webratlink.js, though we're not that familiar with the codebase, so we don't have confidence we wouldn't break something else. Are there tests for this code?