unittest停止工作。向我显示了“连接被拒绝”(如标题中所示)。 geckodirver.log显示以下内容
1559581388377 geckodriver INFO Listening on 127.0.0.1:54601
1559581389320 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.zyb58n9FmLlx
1559581389321 geckodriver::marionette INFO Starting browser /usr/bin/firefox
1559581389323 geckodriver::marionette INFO Connecting to Marionette on localhost:32931
1559581390007 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1559581390007 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1559581390007 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
1559581393609 Marionette INFO Listening on port 2828
console.error: BroadcastService:
receivedBroadcastMessage: handler for
remote-settings/monitor_changes
threw error:
Message: Error: Polling for changes failed: NetworkError when attempting to fetch resource..
Stack:
remoteSettingsFunction/remoteSettings.pollChanges@resource://services-settings/remote-settings.js:190:13
1559581450024 geckodriver INFO Listening on 127.0.0.1:47318
1559581451024 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.FDdsjfOq9aQT
1559581451026 geckodriver::marionette INFO Starting browser /usr/bin/firefox
1559581451029 geckodriver::marionette INFO Connecting to Marionette on localhost:44244
1559581451840 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1559581451840 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1559581451840 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
1559581457209 Marionette FATAL Remote protocol server failed to start: Error: Could not bind to port 2828 (NS_ERROR_SOCKET_ADDRESS_IN_USE)(chrome://marionette/content/server.js:87:17) JS Stack trace: set acceptConnections@server.js:87:17
start@server.js:118:5
init/<@marionette.js:468:9
JavaScript error: jar:file:///usr/lib/firefox/omni.ja!/components/nsUrlClassifierListManager.js, line 329: NS_ERROR_NOT_INITIALIZED: Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIUrlClassifierDBService.getTables]
JavaScript error: jar:file:///usr/lib/firefox/omni.ja!/components/nsUrlClassifierListManager.js, line 329: NS_ERROR_NOT_INITIALIZED: Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIUrlClassifierDBService.getTables]
升级到 将geckodriver升级为0.24.0(2019-01-28) Mozilla Firefox 66.0.3
使用了分裂功能:Browser(firefox_binary =“ / usr / bin / firefox”)
from splinter import Browser
browser = Browser(firefox_binary="/usr/bin/firefox")
browser.visit( 'https://www.google.com' )
browser.fill( 'q', 'splinter - python acceptance testing for web application' )
browser.quit()
浏览器像以前一样弹出,但是URL字符串中没有任何显示,并且浏览器几乎立即消失,然后终端显示“拒绝连接”消息