[rspec-users] webrat cannot find label?

James B. Byrne byrnejb at harte-lyne.ca
Thu Nov 13 14:02:15 EST 2008

Cucumber 0.1.9, Rails 2.2.0RC1, Ruby 1.8.6, Webrat... etc.

Here is the scenario:

  Scenario: Attempt to ADD a VALID entity
    Given I am on the new entity page
    When I fill in "Common Name" with "My Common Name"
      And I <do what> to select "CORP" from the list labelled "Legal Form"
      And I fill in "Full Legal Name" with "My Full Legal Name"e
      And I press "Create"
    Then I should see "was successfully created"

What is the correct syntax to test selecting from a range of values
present in an input box?  I have tried several variants of "select x from
y" and I have tried to match the syntax of webrat to cucumber but nothing
I do seems to work as I anticipate.  Do I have to write my own step for
this sort of thing?  The "fill in" syntax seems to find a generated step,
because I certainly have not written one for it.  I so,. should not all of
the input methods do likewise?

Guidance will be greatly appreciated.

***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

More information about the rspec-users mailing list