2016-08-04 92 views
0

當我啓動量角器時,Firefox會打開,但我的測試不會執行。過了一段時間,我得到了超時錯誤。你能幫我解決問題嗎? (與鉻合作良好)。無法使用Firefox啓動量角器

操作系統:Windows 8.1 x64的

量角器--version 版本4.0.2

版Firefox 48.0

protractor.config.js:

exports.config = { 
    directConnect: true, 
    seleniumAddress: 'http://localhost:4444/wd/hub', 
    specs: ['*.spec.js'], 
    baseUrl: 'http://localhost:9876', 
    capabilities: { 
     'browserName': 'firefox' 
    } 
}; 

首先,我開始的webdriver :

>webdriver-manager start 

然後在其他CMD,我跑量角器:

>protractor protractor.conf.js 

輸出:

X:\e2e>protractor protractor.conf.js 
[15:38:25] I/direct - Using FirefoxDriver directly... 
[15:38:25] I/launcher - Running 1 instances of WebDriver 
[15:39:11] E/launcher - Timed out waiting for the WebDriver server at http://127 
.0.0.1:55485/hub 
[15:39:11] E/launcher - Error: Timed out waiting for the WebDriver server at htt 
p://127.0.0.1:55485/hub 
    at Error (native) 
    at onError (C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\node_ 
modules\selenium-webdriver\http\util.js:87:11) 
    at ManagedPromise.invokeCallback_ (C:\Users\<USER>\AppData\Roaming\npm\node_m 
odules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14) 
    at TaskQueue.execute_ (C:\Users\<USER>\AppData\Roaming\npm\node_modules\protr 
actor\node_modules\selenium-webdriver\lib\promise.js:2913:14) 
    at TaskQueue.executeNext_ (C:\Users\<USER>\AppData\Roaming\npm\node_modules\p 
rotractor\node_modules\selenium-webdriver\lib\promise.js:2896:21) 
    at C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\node_modules\s 
elenium-webdriver\lib\promise.js:2775:27 
    at C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\node_modules\s 
elenium-webdriver\lib\promise.js:639:7 
    at process._tickCallback (node.js:369:9) 
From: Task: WebDriver.createSession() 
    at Function.createSession (C:\Users\<USER>\AppData\Roaming\npm\node_modules\p 
rotractor\node_modules\selenium-webdriver\lib\webdriver.js:329:24) 
    at Driver (C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\node_m 
odules\selenium-webdriver\firefox\index.js:386:38) 
    at Direct.getNewDriver (C:\Users\<USER>\AppData\Roaming\npm\node_modules\prot 
ractor\built\driverProviders\direct.js:75:26) 
    at Runner.createBrowser (C:\Users\<USER>\AppData\Roaming\npm\node_modules\pro 
tractor\built\runner.js:187:43) 
    at C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\built\runner.j 
s:261:30 
    at _fulfilled (C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\no 
de_modules\q\q.js:834:54) 
    at self.promiseDispatch.done (C:\Users\<USER>\AppData\Roaming\npm\node_module 
s\protractor\node_modules\q\q.js:863:30) 
    at Promise.promise.promiseDispatch (C:\Users\<USER>\AppData\Roaming\npm\node_ 
modules\protractor\node_modules\q\q.js:796:13) 
    at C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\node_modules\q 
\q.js:556:49 
    at runSingle (C:\Users\<USER>\AppData\Roaming\npm\node_modules\protractor\nod 
e_modules\q\q.js:137:13) 
[15:39:11] E/launcher - Process exited with error code 199 
+0

你可以把你的代碼關聯到browser.get()和一個空的瀏覽器打開atleast? –

回答

1

火狐48尚未被量角器的最新版本的支持,請降級火狐47.0.1並嘗試它肯定會工作!

相關問題