gpt4 book ai didi

Angularjs试图运行 Protractor

转载 作者:行者123 更新时间:2023-12-03 14:09:35 24 4
gpt4 key购买 nike

我正在完成这个 angularjs tutorial

在第 3 步,他们告诉您通过 npm run protractor 运行 Protractor

当我在 angular-phonecat 文件夹中执行此操作时,没有任何 react :

Nothing happens
我已经按照事先的指示运行了 npm installnpm run update-webdriver 命令。

更重要的是我下载了android种子项目并将教程中第3步的代码复制到controlers.js index.html和scenerios.js

当我运行 Protractor 时,出现以下错误(在我的浏览器打开后):

> angular-seed@0.0.0 protractor C:\wamp\www\angularSite
> protractor test/protractor-conf.js

Starting selenium standalone server...
Selenium standalone server started at http://10.0.7.22:55840/wd/hub

C:\wamp\www\angularSite\node_modules\protractor\node_modules\selenium-webdriver\
lib\webdriver\promise.js:1549
throw error;
^
Error: Angular could not be found on the page http://localhost:8000/app/index.ht
ml : retries looking for angular exceeded
at assertAngularOnPage (C:\wamp\www\angularSite\node_modules\protractor\lib\
protractor.js:668:13)
at C:\wamp\www\angularSite\node_modules\protractor\node_modules\selenium-web
driver\lib\goog\base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (C:\wamp\www\angularSite\nod
e_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:14
45:20)
at notify (C:\wamp\www\angularSite\node_modules\protractor\node_modules\sele
nium-webdriver\lib\webdriver\promise.js:328:12)
at notifyAll (C:\wamp\www\angularSite\node_modules\protractor\node_modules\s
elenium-webdriver\lib\webdriver\promise.js:297:7)
at fulfill (C:\wamp\www\angularSite\node_modules\protractor\node_modules\sel
enium-webdriver\lib\webdriver\promise.js:402:7)
at Object.webdriver.promise.asap (C:\wamp\www\angularSite\node_modules\protr
actor\node_modules\selenium-webdriver\lib\webdriver\promise.js:678:5)
at webdriver.promise.ControlFlow.runInNewFrame_ (C:\wamp\www\angularSite\nod
e_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:14
56:25)
at notify (C:\wamp\www\angularSite\node_modules\protractor\node_modules\sele
nium-webdriver\lib\webdriver\promise.js:328:12)
at notifyAll (C:\wamp\www\angularSite\node_modules\protractor\node_modules\s
elenium-webdriver\lib\webdriver\promise.js:297:7)
==== async task ====
WebDriver.executeScript()
at webdriver.WebDriver.schedule (C:\wamp\www\angularSite\node_modules\protra
ctor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:267:15)
at webdriver.WebDriver.executeAsyncScript (C:\wamp\www\angularSite\node_modu
les\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:507:15
)
at Protractor.get (C:\wamp\www\angularSite\node_modules\protractor\lib\protr
actor.js:675:15)
at null.<anonymous> (C:\wamp\www\angularSite\test\e2e\scenarios.js:7:11)
at jasmine.Env.describe_ (C:\wamp\www\angularSite\node_modules\protractor\no
de_modules\minijasminenode\lib\jasmine-1.3.1.js:907:21)
at jasmine.Env.describe (C:\wamp\www\angularSite\node_modules\protractor\nod
e_modules\minijasminenode\lib\jasmine-1.3.1.js:892:15)
at describe (C:\wamp\www\angularSite\node_modules\protractor\node_modules\mi
nijasminenode\lib\jasmine-1.3.1.js:652:27)
at Object.<anonymous> (C:\wamp\www\angularSite\test\e2e\scenarios.js:5:1)
at Module._compile (module.js:456:26)

npm ERR! angular-seed@0.0.0 protractor: `protractor test/protractor-conf.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the angular-seed@0.0.0 protractor script.
npm ERR! This is most likely a problem with the angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! protractor test/protractor-conf.js
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-seed
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.0.6002
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "protractor"
npm ERR! cwd C:\wamp\www\angularSite
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\wamp\www\angularSite\npm-debug.log
npm ERR! not ok code 0

这是我的日志文件的内容(以防万一)npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'protractor' ]
2 info using npm@1.4.3
3 info using node@v0.10.26
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'preprotractor', 'protractor', 'postprotractor' ]
6 info preprotractor angular-seed@0.0.0
7 info protractor angular-seed@0.0.0
8 verbose unsafe-perm in lifecycle true
9 info angular-seed@0.0.0 Failed to exec protractor script
10 error angular-seed@0.0.0 protractor: `protractor test/protractor-conf.js`
10 error Exit status 8
11 error Failed at the angular-seed@0.0.0 protractor script.
11 error This is most likely a problem with the angular-seed package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error protractor test/protractor-conf.js
11 error You can get their info via:
11 error npm owner ls angular-seed
11 error There is likely additional logging output above.
12 error System Windows_NT 6.0.6002
13 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "protractor"
14 error cwd C:\wamp\www\angularSite
15 error node -v v0.10.26
16 error npm -v 1.4.3
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]

如果有帮助的话,我会在我的机器上运行 windows vista x64。

最佳答案

当我忘记运行我的网络服务器时,我遇到了这个问题。您可以通过运行 npm start 来解决它在一个单独的外壳中。 Protractor 不会为您执行此操作。

关于Angularjs试图运行 Protractor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23100346/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com