Neema Cheriyath
2009-Apr-15 13:04 UTC
[rspec-users] Ambigous error while running cucumber features
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 Attachments: http://www.ruby-forum.com/attachment/3577/searchfiles.txt -- Posted via http://www.ruby-forum.com/.