#343 new
Mike Grafton

'click_link' with Selenium finds first match based on substring, ignoring exact matches

Reported by Mike Grafton | January 20th, 2010 @ 09:00 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?

Mike Grafton

No comments found

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket

Referenced by

Pages