使用Selenium(node.js)运行测试用例时出现ETIMEDOUT错误

时间:2019-08-12 02:45:32

标签: node.js selenium

运行测试用例(使用selenium-webdriver/firefox)会间歇性地错误提示

  

[UnhandledPromiseRejectionWarning:错误:ETIMEDOUT连接ETIMEDOUT   127.0.0.1:53240]

该错误仅在从我的工作网络运行时发生。在家中运行时,不会发生此错误,因此这可能是代理问题?但是为什么那只会间歇地发生呢?

整个错误是:

(node:9888) UnhandledPromiseRejectionWarning: Error: ETIMEDOUT connect ETIMEDOUT
127.0.0.1:53240
at ClientRequest.<anonymous> (C:\Data\cas-testing\node_modules\selenium-webd
river\http\index.js:258:15)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:9888) 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)

0 个答案:

没有答案