Selenium and Rails

Hello all,
Has anyone had any luck writing and using Selenium tests in the rails
environment. If so, what pitfalls have you run into? Have you got any
tips or tricks?

Thanks,
Will


TV dinner still cooling?
Check out “Tonight’s Picks” on Yahoo! TV.

I have only used the IDE and then ported that to core for testing in
IE.

I ran into issues with AJAX more than anything else. So, I have an
AJAX call that dynamically updates a list. There is a trick to use
waitforcondition where you can insert javascript. In this example, the
country lists is seletected and then updates the holidays. Then the
script will wait for the word “Boxing” to be populated before going
on:

view code contains (which updates the holidays[] field through a
partial render in the ical_events action):
<%= observe_field :holiday_selected, :frequency=>0.5,
:update=>‘ical_list’,
:url=>
{:controller=>‘event’, :action=>‘ical_events’, :only_path=>false},
:with=>"‘holiday=’ + encodeURIComponent(value)" %>

test code contains:

select holiday_selected label=Australian Holidays waitForCondition var value = selenium.getText("// select[@name='holidays[]']");  value.match(/Boxing/) 5000