Doing Selenium tests and :confirm inside a link_to_remote does not work

Hello there.
I have a problem doing Selenium tests.
When I try to test my delete method doesn’t prompt me the respective
alert which otherwise would appears before run the destroy method on
the controller.
Without Selenium the application prompt me as the regular way but
within Selenium things go badly.

Here is a part of my view:
<%=link_to_remote image_tag(’/images/trash_can.gif’, :border => 0),
:confirm => ‘Delete Schema ‘+schema.name+’?’,
:url=>{:controller=>:schema,:action=>:delete,:id=>schema.id},
:before=>"$(‘shownDiv#{schema.id}’).visualEffect(‘highlight’,
{duration:3});",
:complete=>"$(‘shownDiv#{schema.id}’).shrink();$
(‘inline#{schema.id}’).hide();"%>

Yes, I am using a bit of RJS, is that what cause this weird behavior?
And in the controller I have.

def delete
@schema = Schema.find(params[:id])
@schema.destroy
respond_to do |format|
format.js
end
end

Actually my main concern if this behavior could impact negatively in
the performance of the application in other different environments,
let’s say, browsers.

Thanks!!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs