Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6144921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:43:13+00:00 2026-05-23T18:43:13+00:00

I’m a relative newbie starting up a new Ruby on Rails app. I started

  • 0

I’m a relative newbie starting up a new Ruby on Rails app. I started by following a combination of instructions at https://github.com/intridea/omniauth, http://www.communityguides.eu/articles/16, http://intridea.com/2011/1/31/easy-rails-admin-login-with-google-apps-and-omniauth?blog=company . At the point everything appeared to work correctly, I started to write my very first cucumber features and steps. I was able to get a couple of steps up and running, but I’ve been bogged down on a step that I thought was built in. I have a form with two submit_tags but I can’t get a scenario to successfully pass a basic And I press "button" step.

possibly relevant gems:

rails (3.1.0.rc4)
capybara (1.0.0)
cucumber (1.0.1)
cucumber-rails (1.0.2)
nokogiri (1.4.7)
gherkin (2.4.5)
rack-test (0.6.0)
selenium-webdriver (0.2.2)

section of the form in question:

<%= form_tag :controller => "services", :action => "newaccount" do %>
  <%= submit_tag "confirm", :id => "confirm", :title => "confirm", :value => "confirm", :text => "confirm", :name => "confirm" %> 
  <%= submit_tag "cancel", :id => "cancel", :title => "cancel", :value => "cancel", :text => "cancel", :name => "cancel"  %>
<% end %>

scenario in question:

Scenario: I register with a valid and currently active google account
    Given I am not registered
     When I sign in with a valid and currently active google account
      And I press "confirm"  # <-- THE PROBLEMATIC STEP
     Then I should see "Your account has been created and you have been signed in!"

I think this is the relevant web_step (straight from the default web_steps.rb which I have not edited at all):

When /^(?:|I )press "([^"]*)"$/ do |button|
  click_button(button)
end

relevant cucumber output:

Scenario: I register with a valid and currently active google account            # features/auth_and_auth/initial_tests.feature:6
  Given I am not registered                                                      # features/step_definitions/authentication_steps.rb:1
  When I sign in with a valid and currently active google account                # features/step_definitions/authentication_steps.rb:5
  And I press "confirm"                                                          # features/step_definitions/web_steps.rb:52
    no button with value or id or text 'confirm' found (Capybara::ElementNotFound)
    (eval):2:in `click_button'
    ./features/step_definitions/web_steps.rb:53:in `/^(?:|I )press "([^"]*)"$/'
    features/auth_and_auth/initial_tests.feature:9:in `And I press "confirm"'
  Then I should see "Your account has been created and you have been signed in!" # features/step_definitions/web_steps.rb:105

relevant html output:

<input id="confirm" name="confirm" text="confirm" title="confirm" type="submit" value="confirm">
<input id="cancel" name="cancel" text="cancel" title="cancel" type="submit" value="cancel">

As is obvious, I’ve accounted for value, id, text, as well as name and title. I also saw a post that said the input type had to be specified as submit which it appears to have been. And I’ve tried it with both the confirm button and the cancel button.

After searching everywhere that I know about, and trying every suggestion that looked even remotely relevant, I’m at an impasse. What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:43:13+00:00Added an answer on May 23, 2026 at 6:43 pm

    I’m not sure if the code below is the best way to deal with the problem I encountered, but it is getting the relevant step to pass.

    When /^(?:|I )press "([^"]*)"$/ do |button|
    # click_button(button)  # the original web_steps.rb version that fails
      %{I press (button)}   # my revised version that passes
    end
    

    I’d still appreciate any feedback on:

    • why the original web_steps.rb version fails,
    • whether this is an appropriate approach or not, and
    • if there is a more ‘rails’ way to deal with this.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.