黄瓜和量角器测试,在Feature文件上,错误:SyntaxError:意外的令牌,预期;

TO CHECK MY FEATURE FILE我是Cucumber / Protractor的新手 . 我有这个错误启动 protractor.conf.js

E/launcher - Error: SyntaxError: C:/Users/home/Desktop/testing_protractor/test reali/login_1/features/test.feature: Unexpected token, expected ; (1:16)

1 | Feature: Verify the login page as UK customer
    |                 ^   2 |   As I am a UK customer   3 |   I want to open the login page   4 |   So that I can see the login page content and go to my-cart page
    at Parser.pp$5.raise (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:4454:13)
    at Parser.pp.unexpected (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:1761:8)
    at Parser.pp.semicolon (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:1742:38)
    at Parser.pp$1.parseExpressionStatement (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:2236:8)
    at Parser.pp$1.parseStatement (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:1911:17)
    at Parser.pp$1.parseLabeledStatement (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:2228:20)
    at Parser.pp$1.parseStatement (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:1909:17)
    at Parser.pp$1.parseBlockBody (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:2268:21)
    at Parser.pp$1.parseTopLevel (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:1778:8)
    at Parser.parse (C:\Users\home\Desktop\testing_protractor\test reali\login_1\node_modules\babylon\lib\index.js:1673:17) [15:04:28] E/launcher - Process exited with error code 100

你可以帮我解决这个问题吗?谢谢!

功能:验证登录页面为英国客户因为我是英国客户我想打开登录页面以便我可以看到登录页面内容并转到我的购物车页面

场景:验证登录页面提交功能作为英国注册客户鉴于我是英国客户当我看到提交按钮时我填写了所有必填字段然后我可以点击它登录我可以打开MyCart页

回答(0)