症状 当运行Protractor时,测试通过但是Protractor不会遍历页面。页面加载空白并在地址中包含“data:text / html”或“data:text / html”。 (见截图)。
测试节目通过了0但断言。请参见下面的量角器输出。
另外,我在一个团队工作。其他团队成员不会这样做。
配置 量角器2.2.0 Gulp Protractor 1.4.28 Chrome 49.0.2623.112
[09:49:23] Using gulpfile c:\Workspace\main\cuas-ui\gulpfile.js
[09:49:23] Starting 'cleanProtractor'...
[09:49:23] Starting 'ft'...
[09:49:23] Finished 'cleanProtractor' after 14 ms
[09:49:23] Finished 'ft' after 5.23 ms
[launcher] Running 5 instances of WebDriver
...................
------------------------------------
[chrome #1-0] PID: 9540
[chrome #1-0] Specs: c:\Workspace\main\cuas-ui\test\functional\account-spec.js
[chrome #1-0]
[chrome #1-0] Starting selenium standalone server...
[chrome #1-0] Selenium standalone server started at http://10.212.159.91:58064/wd/hub
[chrome #1-0] [32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0mUncaught exception: Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
[launcher] Runner process exited unexpectedly with error code: 1
[launcher] 5 instance(s) of WebDriver still running
------------------------------------
[chrome #1-4] PID: 15712
[chrome #1-4] Specs: c:\Workspace\main\cuas-ui\test\functional\assignGroupsToOrders-spec.js
[chrome #1-4]
[chrome #1-4] Starting selenium standalone server...
[chrome #1-4] Selenium standalone server started at http://10.212.159.91:53291/wd/hub
[chrome #1-4] [32m.[0m[32m.[0m[32m.[0m
[chrome #1-4]
[chrome #1-4] Finished in 0.197 seconds
[chrome #1-4] [32m3 tests, 0 assertions, 0 failures
[0m [chrome#1-4] [chrome#1-4]关闭selenium独立服务器。
[launcher] 5 instance(s) of WebDriver still running
------------------------------------
[chrome #1-3] PID: 1960
[chrome #1-3] Specs: c:\Workspace\main\cuas-ui\test\functional\accountUserUnlock-spec.js
[chrome #1-3]
[chrome #1-3] Starting selenium standalone server...
[chrome #1-3] Selenium standalone server started at http://10.212.159.91:62120/wd/hub
[chrome #1-3] [32m.[0m
[chrome #1-3]
[chrome #1-3] Finished in 0.108 seconds
[chrome #1-3] [32m1 test, 2 assertions, 0 failures
[0m [chrome#1-3] [chrome#1-3]关闭selenium独立服务器。
[launcher] 5 instance(s) of WebDriver still running
------------------------------------
[chrome #1-2] PID: 12664
[chrome #1-2] Specs: c:\Workspace\main\cuas-ui\test\functional\accountUserEdit-spec.js
[chrome #1-2]
[chrome #1-2] Starting selenium standalone server...
[chrome #1-2] Selenium standalone server started at http://10.212.159.91:52770/wd/hub
[chrome #1-2] [32m.[0m[32m.[0m
[chrome #1-2]
[chrome #1-2] Finished in 0.165 seconds
[chrome #1-2] [32m2 tests, 0 assertions, 0 failures
[0m [chrome#1-2] [chrome#1-2]关闭selenium独立服务器。
[launcher] 5 instance(s) of WebDriver still running
------------------------------------
[chrome #1-1] PID: 7408
[chrome #1-1] Specs: c:\Workspace\main\cuas-ui\test\functional\accountFeatures-spec.js
[chrome #1-1]
[chrome #1-1] Starting selenium standalone server...
[chrome #1-1] Selenium standalone server started at http://10.212.159.91:56992/wd/hub
[chrome #1-1] [32m.[0m[32m.[0m
[chrome #1-1]
[chrome #1-1] Finished in 0.169 seconds
[chrome #1-1] [32m2 tests, 0 assertions, 0 failures
[0m [chrome#1-1] [chrome#1-1]关闭selenium独立服务器。
[launcher] 5 instance(s) of WebDriver still running
......F.F......
------------------------------------
[chrome #1-5] PID: 17184
[chrome #1-5] Specs: c:\Workspace\main\cuas-ui\test\functional\assignUserToGroup-spec.js
[chrome #1-5]
[chrome #1-5] Starting selenium standalone server...
[chrome #1-5] Selenium standalone server started at http://10.212.159.91:60187/wd/hub
[chrome #1-5] [32m.[0m[32m.[0m[32m.[0m
[chrome #1-5]
[chrome #1-5] Finished in 0.111 seconds
[chrome #1-5] [32m3 tests, 0 assertions, 0 failures
[0m [chrome#1-5] [chrome#1-5]关闭selenium独立服务器。
------------------------------------
[chrome #1-25] PID: 16200
[chrome #1-25] Specs: c:\Workspace\main\cuas-ui\test\functional\siteLetter-spec.js
[chrome #1-25]
[chrome #1-25] Starting selenium standalone server...
[chrome #1-25] Selenium standalone server started at http://10.212.159.91:54525/wd/hub
[chrome #1-25] [32m.[0m[32m.[0m[32m.[0m
[chrome #1-25]
[chrome #1-25] Finished in 0.109 seconds
[chrome #1-25] [32m3 tests, 0 assertions, 0 failures
[0m [chrome#1-25] [chrome#1-25]关闭selenium独立服务器。
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1-0 failed with exit code: 1
[launcher] chrome #1-4 passed
[launcher] chrome #1-3 passed
[launcher] chrome #1-2 passed
[launcher] chrome #1-1 passed
[launcher] chrome #1-5 passed
[launcher] chrome #1-7 passed
[launcher] chrome #1-6 passed
[launcher] chrome #1-8 passed
[launcher] chrome #1-9 failed 2 test(s)
[launcher] chrome #1-10 passed
[launcher] chrome #1-11 passed
[launcher] chrome #1-14 passed
[launcher] chrome #1-12 passed
[launcher] chrome #1-13 passed
[launcher] chrome #1-16 passed
[launcher] chrome #1-15 passed
[launcher] chrome #1-17 passed
[launcher] chrome #1-19 passed
[launcher] chrome #1-18 passed
[launcher] chrome #1-21 failed with exit code: 1
[launcher] chrome #1-20 passed
[launcher] chrome #1-22 passed
[launcher] chrome #1-24 passed
[launcher] chrome #1-23 passed
[launcher] chrome #1-26 failed with exit code: 1
[launcher] chrome #1-25 passed
[launcher] overall: 2 failed spec(s) and 3 process(es) failed to complete
[launcher] Process exited with error code 100
答案 0 :(得分:0)
升级到NodeJS 4.4.X然后一切正常。