cucumber - Unable to find field "title" (Capybara::ElementNotFound) -



cucumber - Unable to find field "title" (Capybara::ElementNotFound) -

i'm starting create bdd cucumber.

i have written first scenario this

scenario: ... given on new event page , fill in "title" "tata"

with these steps

given /^i on (.+)$/ |page_name| visit("/event/new") end when /^i fill in "([^\"]*)" "([^\"]*)"$/ |field, value| fill_in(field.gsub(' ', '_'), :with => value) end

it works good, nice. now, want utilize send function visit page. have changed first step this.

given /^i on (.+)$/ |page_name| self.send("new_event_path".to_sym) end

the page found fill_in not work because element not found.

unable find field "title" (capybara::elementnotfound)

i don't understand why it's not working send function?

the solution :

given /^i on (.+)$/ |page_name| visit(self.send("new_event_path".to_sym)) end

thanks dave, response help me :)

eric

cucumber capybara

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -