#344 new
Mike Grafton

'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?

Mike Grafton

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

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

Pages