0

I am writing tests using WebdriverIO with NodeJs. I am trying to get edge driver based on the version of Edge browser installed.

Details:

I have installed the service wdio-chromedriver-service.

It is mentioned that with the environment variable "EDGECHROMIUMDRIVER_VERSION", the required version of driver can be downloaded. For example $env:EDGECHROMIUMDRIVER_VERSION = "109.0.1518.55"

But I prefer not to specify the version. Instead, I would like to get the latest or the matching version of driver by setting something like $env:EDGECHROMIUMDRIVER_VERSION = "LATEST"

Please refer this link https://github.com/uex-io/node-msedgedriver to get more details on versioning options available

I tried set the required environment variable like this -> $env:EDGECHROMIUMDRIVER_VERSION = "LATEST"

And tried using .npmrc file with a property set like this -> "edgechromiumdriver_version=LATEST"

But both the approaches throw error as follows while doing "npm install"

npm ERR! code 1 npm ERR! path C:*\Repo\test\ui-test\node_modules\msedgedriver npm ERR! command failed npm ERR! command C:\windows\system32\cmd.exe /d /s /c node install.js npm ERR! C:\Users*~1\AppData\Local\Temp\��108.0.1462.76 npm ERR! \msedgedriver is not writable: The argument 'path' must be a string or Uint8Array without null bytes. Received 'C:\Users\~1\AppData\Local\Temp\��1\x000\x008\x00.\x000\x00.\x001\x004\x006\x002\x00.\x007\x006\x00\r\x00\n' + npm ERR! '\x... npm ERR! C:\Users*****~1\AppData\Local\Temp\��108.0.1462.76 npm ERR! \msedgedriver is not writable: The argument 'path' must be a string or Uint8Array without null bytes. Received 'C:\Users\~1\AppData\Local\Temp\��1\x000\x008\x00.\x000\x00.\x001\x004\x006\x002\x00.\x007\x006\x00\r\x00\n' + npm ERR! '\x... npm ERR! \tmp\��108.0.1462.76 npm ERR! \msedgedriver is not writable: The argument 'path' must be a string or Uint8Array without null bytes. Received 'C:\tmp\��1\x000\x008\x00.\x000\x00.\x001\x004\x006\x002\x00.\x007\x006\x00\r\x00\n\x00\msedgedriver' npm ERR! C:*\Repo\test\ui-test\node_modules\msedgedriver\tmp\��108.0.1462.76 npm ERR! \msedgedriver is not writable: The argument 'path' must be a string or Uint8Array without null bytes. Received 'C:\\Repo\test\ui-test\node_modules\msedgedriver\tmp\��1\x000\x008\x00.\x000\x00.\x001\x004\x006\x002\x00.\x007\x00... npm ERR! Can not find a writable tmp directory, please report issue on https://github.com/uex-io/node-msedgedriver/issues/ with as much information as possible.

prasanth
  • 1
  • 2

1 Answers1

0

Though Microsoft Edge is based on chromium browser, it's not recommended to always put chrome driver as Edge's browser driver.

If you wanna let your automation project fetch the version and download it automatically, why don't use service: [selenium-standalone] ?

It'll downloads the browser driver with compatible version if you don't specify.

ChingYu Li
  • 11
  • 1
  • Thanks for the suggestion. I tried "selenium-standalone" service. It starts browsers using DevTools protocol. But I prefer running browsers using Webdriver protocol. – prasanth Jan 31 '23 at 05:01