- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我是 node.js 和 Selenium 的新手,所以如果我没有立即提供所需的所有详细信息,请多多包涵。
这是我想在 FF 中运行的非常简单的测试(我在这里发现了很多这样的问题,但它们指的是 Chrome):
const webdriver = require('selenium-webdriver');
const builder = new webdriver.Builder();
builder.forBrowser('firefox');
const driver = builder.build();
driver.get('https://google.com');
driver.quit();
这是我不断收到的错误:
(node:3534) UnhandledPromiseRejectionWarning: Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:62412 at ClientRequest. (/Users/name/training/learningnodejs/node_modules/selenium-webdriver/http/index.js:244:15) at ClientRequest.emit (events.js:160:13) at Socket.socketErrorListener (_http_client.js:389:9) at Socket.emit (events.js:160:13) at emitErrorNT (internal/streams/destroy.js:64:8) at process._tickCallback (internal/process/next_tick.js:152:19) (node:3534) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:3534) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Selenium 版本:5.6.0
最佳答案
有同样的问题。安装以前版本的 selenium-webdriver 对我有帮助。
npm install selenium-webdriver@3.6.0
关于node.js - 来自 Selenium : UnhandledPromiseRejectionWarning: Error: ECONNREFUSED connect ECONNREFUSED 的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48791928/
我有 await 语句,它们可能会引发错误,因此我在 try/catch 内执行它们。但是 try/catch 没有捕获它们,我收到警告: (node:4496) UnhandledPromiseRe
最近,我在ionic中创建了一个应用程序,我想在ios中对其进行测试。所以我运行命令ionic cordova emulate ios。但是,这给了我以下错误。 (节点:4200)UnhandledP
我正在尝试使用 node.js discord 模块制作一个机器人,当在 discord 中输入命令时,它会向用户发送私有(private)消息。该命令应该像这样使用 !rp 然后邮件将发送给收件人
我正在尝试调用一个异步方法。异步方法是: async connect() { this.pool = await mysql.createPool(this.conf);
我按议程包编写了一些代码,但在运行我的项目时遇到了 UnhandledPromiseRejectionWarning。 我的代码在这里: agenda.define('transferDBField'
我有一个代码: function () { return new Promise((resolve, reject) => { try { fetch(URL, { metho
以下是我在 graphql(apollo-server)服务器中的 onDisconnect 函数代码(但不是特定于 graphql 的)。它包含一个 postgres 事务,通过 DB 适配器使用。
我是 Javascript Promise 的新手。我正在尝试以基于 Promises 的方式执行 MySQL 查询,我已经挠头半个小时了,但我仍然找不到这段代码中的问题。我正在使用this arti
尝试从 localhost:3000/todos/在 mongodb 中创建数据后获取数据,我在 Node 中收到错误 [UnhandledPromiseRejectionWarning: 错误 [E
我收到以下错误: Houston we got an err at getGames in index.js (node:72197) UnhandledPromiseRejectionWarning
所以我正在使用 Express.JS 和 MongoDB 制作一个 Web 应用程序,当我尝试在本地运行它时,它可以工作,但是当我用我的 aws Ubuntu 20.04 机器运行它时,它给了我以下错
我在调用其他发出 axios 请求的函数的函数中处理 UnhandledPromiseRejectionWarning 时遇到问题。 const getCode = async () => { c
我对 Node JS 还很陌生,所以我有点挣扎。 我正在尝试使用 Google Drive 的 API 从我的 Node Js 代码读取文件。 我有以下代码 router.get('/', funct
我正在使用 Angular/Firebase 在 Ionic 中构建一个应用程序。 我想在我的 Android 设备上测试该应用程序,该设备以前运行良好。但是,最近我无法运行它,因为出现错误。 $ i
这个问题在这里已经有了答案: How is PromiseRejectionEvent triggered? (2 个答案) 关闭 3 年前。 如果我在拒绝 promise 后清除计时器 - 无论我
我的目标是使用 Node.js 从网站上抓取一些数据. 我已经设法仅使用request 包来抓取数据,但是我要抓取的站点具有动态内容,而request 只能抓取此动态数据。 所以我做了一些研究,发现要
我玩过 Mocha 测试。我注意到我的函数在少数地方引发了 “UnhandledPromiseRejectionWarning” 警告。它使脚本无法通过检查。 我无法在互联网上找到有用的示例来教授/展
最近,我在测试代码时经常遇到此错误。刚才我在尝试执行包含错误的同步代码时再次收到此错误: (async function() { const characterProfile = await Mo
我知道涉及 SO 上的 UnhandledPromiseRejectionWarning 问题的现有答案,但找到的答案似乎都与我的情况不充分匹配。基本上,我以为我知道如何处理 promise 。但这个
我当前的nodejs版本是:8.9.1 我正在尝试执行我的代码,但总是遇到此错误,尝试修复它,但总是出现相同的错误: (node:38) UnhandledPromiseRejectionWarnin
我是一名优秀的程序员,十分优秀!