Hello Friends.
I have a scenario where I am using "link_to_remote" For a ajax
request.
Cucmber Script
Then I click on "Active"
Steps
Then /^I click on "([^\"]*)"$/ do |click|
visit("/controller/some_action/#{@office.id}")
end
controller
def some_action
if post.xhr?
something....
end
end
But When I run the cucumber script I am post.xhr? "FALSE" But the same
I am
getting true from browser
Can you please help me out Where I am getting worng?
thanks
abhis
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
the cucumber/webrat visit is not a xhr (ajax) call. You probably need to go with watir or selenium... On 16 Dez., 06:55, Abhishek shukla <bettera...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello Friends. > > I have a scenario where I am using "link_to_remote" For a ajax request. > > Cucmber Script > Then I click on "Active" > > Steps > Then /^I click on "([^\"]*)"$/ do |click| > visit("/controller/some_action...-Ntza2DNMkXFgoHlPtYpdqQ@public.gmane.org}") > end > > controller > > def some_action > if post.xhr? > something.... > end > end > > But When I run the cucumber script I am post.xhr? "FALSE" But the same I am > getting true from browser > > Can you please help me out Where I am getting worng? > > thanks > abhis-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I assume you are using Cucumber with webrat. WebRat does not support Ajax, for that, you would need to use Selenium. Check out the Selenium page on the cucumber github wiki for more info. If you need additional help after that, contact me directly and I may be able to help you set it up. Cheers, Marcelo. Em Dec 15, 2009, às 11:55 PM, Abhishek shukla escreveu:> Hello Friends. > > I have a scenario where I am using "link_to_remote" For a ajax > request. > > > Cucmber Script > Then I click on "Active" > > Steps > Then /^I click on "([^\"]*)"$/ do |click| > visit("/controller/some_action/#{@office.id}") > end > > controller > > def some_action > if post.xhr? > something.... > end > end > > But When I run the cucumber script I am post.xhr? "FALSE" But the > same I am getting true from browser > > Can you please help me out Where I am getting worng? > > thanks > abhis > > -- > > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails- > talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com > . > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en > .-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.