我正要開始學習量角器,並按照有http://www.protractortest.org/#/tutorialProtactor錯誤,意外的令牌)
但不幸的是越來越怪異的錯誤後運行此命令protractor conf.js
[launcher] Process exited with error code 1
/usr/local/lib/node_modules/protractor/node_modules/q/q.js:126
throw e;
SyntaxError: Unexpected token)
at goog.loadModuleFromSource_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1123:19)
at Object.goog.loadModule (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1085:46)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1:6
at Object.Context.closure.goog.retrieveAndExecModule_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js:135:8)
at <anonymous>:1:6
at Context.closure.closure.vm.createContext.CLOSURE_IMPORT_SCRIPT (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js:104:12)
at Object.goog.importScript_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:879:9)
at Object.goog.importModule_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:900:14)
at Object.goog.writeScripts_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1323:16)
at Object.goog.require (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:663:14)
節點版本的簡單教程:v0.10.37
Java版本:1.8.0_66
量角器:版本3.0.0
jadmine:茉莉茉莉V2.3.2核心v2.3.4
UPDATE
已經克隆庫https://github.com/angular/protractor
運行以下命令
./bin/webdriver-manager update --standalone
./bin/webdriver-manager start
打開新的終端標籤
改變網站direcotry
使用npm start
和網站經營的網站文件夾端口已經運行8080
打開新的終端標籤,還是網站文件夾
運行測試下命令npm test
然後鉻瀏覽器在幾秒內打開 並顯示以上相同的錯誤
你試過運行'node_modules/protractor/bin/webdriver-manager update'嗎? – alecxe
是的,我試過在'硒獨立版是最新版本之前運行'。''chromedriver是最新的' – tekdungtralala