Vizag
2015-09-26 08:08:18 UTC
Hi All,
I am a very beginner to Cucumber and BDD. I am getting parser error when
tried to run the first test script itself.
I am windows 7 with 64 bit.
Here is feature file:
-----------------------------------
Feature: Visit Career guide page in career.guru99.com
Scenario: Visit career.guru99.com
Given I am on http://career.guru99.com/
When I click on jobs tab
Then I should see Jobs page
Here is the step-guru.rb file from Step_definitions directroy:
----------------------------------------------------------------------------
#Cucumber:
#BDD...Given-When-Then
#Given - that Web site is open and launched
#When - type in log in and pwd and press login
#Then - The page with title 'Welcome' appears
require 'watir-webdriver'
require 'colorize'
browser = Watir::Browser.new
Given (/^ I am on career.guru99 demo Page$/) do
Browser.goto "http://career.guru99.com"
end
When (/^ click on Jobs tab$/) do
Browser.text (:name, "Jobs" ).click
end
Then (/^ I should see Jobs page$/) do
Browser.goto "http://career.guru99.com/jobs/"
puts "Successful Page load"
browser.close
end
And here is the [Parser Error] that I am seeing when running the Cucumber
script.
====================================================================
c:\Work\Test Scripts\Cucumber\features\step_definitions>cucumber
step-guru.rb
*** WARNING: You must use ANSICON 1.31 or higher
(https://github.com/adoxa/ansic
on/) to get coloured output on Windows
step-guru.rb: Parser errors:
(12:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'requ
ire 'watir-webdriver''
(14:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'requ
ire 'colorize''
(16:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'brow
ser = Watir::Browser.new'
(20:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Give
n (/^ I am on career.guru99 demo Page$/) do'
(22:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Brow
ser.goto "http://career.guru99.com"'
(24:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'end'
(28:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'When
(/^ click on Jobs tab$/) do'
(30:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Brow
ser.text (:name, "Jobs" ).click'
(32:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'end'
(36:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Then
(/^ I should see Jobs page$/) do'
(38:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Brow
ser.goto "http://career.guru99.com/jobs/"'
(Cucumber::Core::Gherkin::ParseError)
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core/gh
erkin/parser.rb:34:in `rescue in document'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core/gh
erkin/parser.rb:29:in `document'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:27:in `block in parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:26:in `each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:26:in `parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:18:in `compile'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime.rb:7
0:in `run!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-2.1.0/lib/cucumber/cli/main.rb:
32:in `execute!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-2.1.0/bin/cucumber:8:in
`<top (
required)>'
C:/Ruby200-x64/bin/cucumber:23:in `load'
C:/Ruby200-x64/bin/cucumber:23:in `<main>'
Can some one please help me here, I have tried to search the group and net
but did not find answer properly.
Thank you,
cheers,
Vizag
I am a very beginner to Cucumber and BDD. I am getting parser error when
tried to run the first test script itself.
I am windows 7 with 64 bit.
Here is feature file:
-----------------------------------
Feature: Visit Career guide page in career.guru99.com
Scenario: Visit career.guru99.com
Given I am on http://career.guru99.com/
When I click on jobs tab
Then I should see Jobs page
Here is the step-guru.rb file from Step_definitions directroy:
----------------------------------------------------------------------------
#Cucumber:
#BDD...Given-When-Then
#Given - that Web site is open and launched
#When - type in log in and pwd and press login
#Then - The page with title 'Welcome' appears
require 'watir-webdriver'
require 'colorize'
browser = Watir::Browser.new
Given (/^ I am on career.guru99 demo Page$/) do
Browser.goto "http://career.guru99.com"
end
When (/^ click on Jobs tab$/) do
Browser.text (:name, "Jobs" ).click
end
Then (/^ I should see Jobs page$/) do
Browser.goto "http://career.guru99.com/jobs/"
puts "Successful Page load"
browser.close
end
And here is the [Parser Error] that I am seeing when running the Cucumber
script.
====================================================================
c:\Work\Test Scripts\Cucumber\features\step_definitions>cucumber
step-guru.rb
*** WARNING: You must use ANSICON 1.31 or higher
(https://github.com/adoxa/ansic
on/) to get coloured output on Windows
step-guru.rb: Parser errors:
(12:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'requ
ire 'watir-webdriver''
(14:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'requ
ire 'colorize''
(16:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'brow
ser = Watir::Browser.new'
(20:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Give
n (/^ I am on career.guru99 demo Page$/) do'
(22:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Brow
ser.goto "http://career.guru99.com"'
(24:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'end'
(28:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'When
(/^ click on Jobs tab$/) do'
(30:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Brow
ser.text (:name, "Jobs" ).click'
(32:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'end'
(36:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Then
(/^ I should see Jobs page$/) do'
(38:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got
'Brow
ser.goto "http://career.guru99.com/jobs/"'
(Cucumber::Core::Gherkin::ParseError)
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core/gh
erkin/parser.rb:34:in `rescue in document'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core/gh
erkin/parser.rb:29:in `document'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:27:in `block in parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:26:in `each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:26:in `parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-core-1.3.0/lib/cucumber/core.rb
:18:in `compile'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime.rb:7
0:in `run!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-2.1.0/lib/cucumber/cli/main.rb:
32:in `execute!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/cucumber-2.1.0/bin/cucumber:8:in
`<top (
required)>'
C:/Ruby200-x64/bin/cucumber:23:in `load'
C:/Ruby200-x64/bin/cucumber:23:in `<main>'
Can some one please help me here, I have tried to search the group and net
but did not find answer properly.
Thank you,
cheers,
Vizag
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.