我試圖運行測試,在Firefox瀏覽器中出現空白屏幕,當我關閉窗口時,出現以下錯誤。如何在量角器測試中運行Firefox?
版本 火狐:45.5.1 硒獨立:3.4.0 Chromedriver 2.30 Geckodriver v0.17.0
[10:10:40] W/driverProviders - Using driver provider directConnect, but also found extra driver provider parameter(s): seleniumAddress
[10:10:40] I/launcher - Running 1 instances of WebDriver
[10:10:40] I/direct - Using FirefoxDriver directly...
[10:11:06] E/launcher - Unable to parse new session response: {"value": {"error": "unknown error","message":"Failed to decode response from marionette","stacktrace":"stack backtrace:\n 0: 0x4bd56f - <no info>\n 1: 0x4b
dcc9 - <no info>\n 2: 0x449980 - <no info>\n 3: 0x4207bc
- <no info>\n 4: 0x405e47 - <no info>\n 5: 0x6db3d9 - <
no info>\n 6: 0x417847 - <no info>\n 7: 0x6d56d3 - <no i
nfo>\n 8: 0x77a359cd - BaseThreadInitThunk"}}
[10:11:06] E/launcher - WebDriverError: Unable to parse new session response: {"
value":{"error":"unknown error","message":"Failed to decode response from marion
ette","stacktrace":"stack backtrace:\n 0: 0x4bd56f - <no info>\n 1
: 0x4bdcc9 - <no info>\n 2: 0x449980 - <no info>\n 3:
0x4207bc - <no info>\n 4: 0x405e47 - <no info>\n 5:
0x6db3d9 - <no info>\n 6: 0x417847 - <no info>\n 7:
0x6d56d3 - <no info>\n 8: 0x77a359cd - BaseThreadInitThunk"}}
at WebDriverError (C:\npm\node_modules\protrac
tor\node_modules\selenium-webdriver\lib\error.js:27:5)
at doSend.then.response (C:npm\node_modules\p
rotractor\node_modules\selenium-webdriver\lib\http.js:445:19)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (C:\npm\node_modules
\protractor\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (C:\npm\node_modules
\protractor\node_modules\selenium-webdriver\firefox\index.js:640:55)
at Direct.getNewDriver (C:\node_modules\pr
otractor\lib\driverProviders\direct.ts:112:25)
at Runner.createBrowser (C:\node_modules\p
rotractor\lib\runner.ts:225:39)
at q.then.then (C\Users\node_modules\protractor
\lib\runner.ts:391:27)
at _fulfilled (C:\node_modules\protractor\
node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\node_modu
les\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\nod
e_modules\protractor\node_modules\q\q.js:796:13)
at C:\node_modules\protractor\node_modules
\q\q.js:556:49
at runSingle (C:\node_modules\protractor\n
ode_modules\q\q.js:137:13)
[10:11:06] E/launcher - Process exited with error code 199
Conf.js
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
baseUrl: 'https://localhost:288020/',
specs: ['index_spec.js'],
directConnect: true,
capabilities: {
'browserName': 'firefox'
}
},
framework: 'jasmine2',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
},
onPrepare: function() {
browser.driver.manage().window().setSize(1366, 768);
}};
謝謝,我會給一個去。 –