Issue 1 is based on nightwatchjs/nightwatch#3337
ISSUE 1:
On node v10 (10.24.1), when I run the selenium code, I get the error SyntaxError: Unexpected token =
in file virtual_authenticator.js
. The same script runs without any error in v12 (12.22.12).
I am not able to test it on v11.
ISSUE 2:
There is another issue which occurs in the same selenium code. On node v18 (18.7.0) the code is not able to start geckodriver and it gives the error Error: Timed out waiting for the WebDriver server at http://localhost:51846/
. The same code works without any error (i.e. it starts the geckodriver) in v16 (16.16.0)
This looks like some version problem with nodejs. I'm troubleshooting it from my end. Any leads would be helpful.
CC: @harsha509
Step 1: Set your nodejs version with your version manager. I use nvm. Step 2: Run the following selenium code. const {Builder} = require('selenium-webdriver'); (async function helloSelenium() { let driver = await new Builder().forBrowser('firefox').build(); await driver.get('https://selenium.dev'); await driver.quit(); })();Relevant log output
ISSUE 1: /Users/tamsilamani/Desktop/BrowserStack/seleniumhq.github.io/examples/javascript/node_modules/selenium-webdriver/lib/virtual_authenticator.js:26 Protocol = { ^ SyntaxError: Unexpected token = at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/Users/tamsilamani/Desktop/BrowserStack/seleniumhq.github.io/examples/javascript/node_modules/selenium-webdriver/lib/webdriver.js:40:20) ISSUE 2: /Users/tamsilamani/Desktop/BrowserStack/seleniumhq.github.io/examples/javascript/node_modules/selenium-webdriver/http/util.js:88 reject(Error('Timed out waiting for the WebDriver server at ' + url)) ^ Error: Timed out waiting for the WebDriver server at http://localhost:51846/ at onError (/Users/tamsilamani/Desktop/BrowserStack/seleniumhq.github.io/examples/javascript/node_modules/selenium-webdriver/http/util.js:88:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)Operating System
macOS Monterey
Selenium versionJavascript 4.4.0
What are the browser(s) and version(s) where you see this issue?Firefox 103.0.2
What are the browser driver(s) and version(s) where you see this issue?GeckoDriver 0.31.0
Are you using Selenium Grid?No response
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4