Forum: RSpec Ambigous error while running cucumber features

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Neema C. (Guest)
on 2009-04-15 17:04
Attachment: searchfiles.txt (0 Bytes)
Hello,
        I was just trying out a cucumber-java example with selenium
integrated. My feature file has two scenarios and while executing the
command "cucumber features", It is executing the first scenario
succesfully, but for the second scenario I am getting the ambiguity
error (Cucumber::Ambiguous):

Scenario: Find what I'm looking for in yahoo        #
features/login.feature:11
  Given I am on the yahoo search page               #
features/login.feature:12
      Ambiguous match of "I am on the yahoo search page":

      public void
main.java.selenium.orbitz.SearchFeature.givenOnHome(java.lang.String)
throws java.lang.Exception:in `/I am on the (Google|yahoo) search page/'
      public void
main.java.selenium.orbitz.SearchFeature.givenOnHome(java.lang.String)
throws java.lang.Exception:in `/I am on the (Google|yahoo) search page/'

      You can run again with --guess to make Cucumber be more smart
about it
       (Cucumber::Ambiguous)
      /opt/jruby-1.2.0/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/step_mother.rb:122:in
`step_match'
      /opt/jruby-1.2.0/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/ast/step_invocation.rb:50:in
`find_step_match!'

Infact I am getting the same error whenver I try to run more than one
scenario in a feature file with java step definitions. But running the
same via ruby step definitions is working fine. Could anyone please
explain how to solve this ambiguity? Is it not possible to run more than
one scenario of cucumber features using cucumber-java ?

I have attached the contents of env.rb, search.feature and the java file
for which this issue is occurring herewith.

Thanks,
Neema
This topic is locked and can not be replied to.