#265 new
tomo

selenium label location strategy chokes on labels with regexp characters

Reported by tomo | June 16th, 2009 @ 03:05 AM

With http://github.com/brynary/webrat/commit/9a42304513cfc2c19831cc1bee5..., the label location strategy fails when trying to locate a label which contains regexp characters (see the "should fill in text field by label with special characters" test in the fill_in_test.rb rails integration test).

One possible fix is to escape the locator in Javascript. I've done this at http://github.com/tomo/webrat/commit/b6b71993eb0b81cee05fb9ea29b5fc... (lh265 branch).

I also made it search for either a word boundary OR end of line so that labels that end in non-word characters will work.

No comments found

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