Ниже приведен журнал geckdriver.
JavaScript warning: https://xxxxx, line 1: String.toLowerCase is deprecated; use String.prototype.toLowerCase instead
1571180445730 Marionette INFO Stopped listening on port 56930
[Child 11304, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 11304, [Parent 15620, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 18764, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 1876[Parent 15620, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 18528, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 18521571193870646 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\xxxxx\\AppData\\Local\\Temp\\rust_mozprofile.wefGvenxtjuS"
1571193871155 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/
1571193871155 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader*
1571193874489 Marionette INFO Listening on port 59485
1571193874542 Marionette WARN TLS certificate errors will be ignored for this session
JavaScript error: https://xxxxx, line 2: ReferenceError: $ is not defined
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:750:13
JavaScript warning: https://xxxxx, line 1: String.toLowerCase is deprecated; use String.prototype.toLowerCase instead
1571195357820 Marionette INFO Stopped listening on port 59485
[Parent 16976, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 19196, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 15192, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 1[Parent 16976, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 17100, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 1
Здесь журнал прекратил генерироваться, и geckodriver не предпринимает никаких действий, даже если я принудительно закрываю браузер Firefox. Скрипт тестирования также не может быть прерван.
По большей части, если я заставлю закрыть браузер, тестирование будет прервано и не пройдёт тест.
Как я могу решить эту проблему?
Ниже приведены мои настройки Firefox:
fp = webdriver.FirefoxProfile()
fp.set_preference("dom.webnotifications.enabled", False)
fp.set_preference("dom.push.enabled", False)
fp.set_preference("app.update.auto", False)
fp.set_preference("app.update.doorhanger", False)
fp.set_preference("app.update.service.enabled", False)
fp.set_preference("app.update.url", "https://do.not.update")
fp.set_preference("app.update.checkInstallTime", False)
fp.set_preference("app.update.silent", True)
fp.set_preference("app.update.download.attempts", 0)
fp.set_preference("browser.search.update", False)
fp.set_preference("extensions.update.enabled", False)
fp.set_preference("services.sync.prefs.sync.extensions.update.enabled", False)
fp.set_preference("app.update.interval", 2592000)
fp.set_preference("app.update.link.updateAvailableWhatsNew", "no-update-available-whats-new")
fp.set_preference("app.update.link.updateManualWhatsNew", "no-update-manual-whats-new")
fp.set_preference("browser.download.folderList", 2)
fp.set_preference("browser.download.manager.showWhenStarting", False)
fp.set_preference(downloadDIR, os.getcwd())
fp.set_preference("browser.helperApps.alwaysAsk.force", False)
fp.set_preference("browser.helperApps.neverAsk.saveToDisk", "text/plain,text/csv,text/html,application/octet-stream,application/force-download,application/pdf,application/binary,application/json,application/vnd.ms-excel,application/zip")
fp.set_preference("pdfjs.disabled", True)
self.driver = webdriver.Firefox(firefox_profile=fp)