質問: 'webdriver - google search') { console.log('test passed'); } else { console.log('test failed'); } }); }); driver.quit(); その場合、コンソールは多くのエラーをスローしますが、ここで正確に機能していないものを読み取ることはできません。誰が私に逃したかもしれないことを教えてもらえますか?node ~/projects/googletest.js (node:21344) unhandledpromiserejectionwarning: sessionnotcreatederror: tried to run command without establishing a connection at object.throwdecodederror (/home/ruphus/node_modules/selenium-webdriver/lib/error.js:550:15) at parsehttpresponse (/home/ruphus/node_modules/selenium-webdriver/lib/http.js:542:13) at executor.execute (/home/ruphus/node_modules/selenium-webdriver/lib/http.js:468:26) at <anonymous> at process._tickcallback (internal/process/next_tick.js:188:7) (node:21344) 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:21344) [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. (node:21344) unhandledpromiserejectionwarning: sessionnotcreatederror: tried to run command without establishing a connection at object.throwdecodederror (/home/ruphus/node_modules/selenium-webdriver/lib/error.js:550:15) at parsehttpresponse (/home/ruphus/node_modules/selenium-webdriver/lib/http.js:542:13) at executor.execute (/home/ruphus/node_modules/selenium-webdriver/lib/http.js:468:26) at <anonymous> at process._tickcallback (internal/process/next_tick.js:188:7) (node:21344) 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: 3) (node:21344) unhandledpromiserejectionwarning: sessionnotcreatederror: tried to run command without establishing a connection at object.throwdecodederror (/home/ruphus/node_modules/selenium-webdriver/lib/error.js:550:15) at parsehttpresponse (/home/ruphus/node_modules/selenium-webdriver/lib/http.js:542:13) at executor.execute (/home/ruphus/node_modules/selenium-webdriver/lib/http.js:468:26) at <anonymous> at process._tickcallback (internal/process/next_tick.js:188:7) (node:21344) 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: 4) (node:21344) unhandledpromiserejectionwarning: nosuchsessionerror: this driver instance does not have a valid session id (did you call webdriver.quit()?) and may no longer be used. at promise.finally (/home/ruphus/node_modules/selenium-webdriver/lib/webdriver.js:726:38) at object.thenfinally [as finally] (/home/ruphus/node_modules/selenium-webdriver/lib/promise.js:124:12) at <anonymous> at process._tickcallback (internal/process/next_tick.js:188:7) (node:21344) 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: 8)
回答: 古いバージョンのselenium-webdriver この脅威 をインストールするという形で回避策を見つけました。npm i selenium-webdriver@3.6.0