selenium webdriver manager update - npm

寵の児 提交于 2019-12-22 08:36:46

问题


I tried to update the selenium webdriver using the "webdriver-manager", but i get the error as,

Error: Got error Error: read ECONNRESET from https://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar
Error: Got error Error: read ECONNRESET from https://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar
fs.js:60
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EPERM: operation not permitted, unlink 'C:\Users\user_name\AppData\Roaming\npm\node_modules\protractor\selenium\selenium-server-standalone-2.48.2.jar'
    at Error (native)

I am not sure what was the cause. I tried updating the protractor too, but no luck.

Also i tried running the command prompt as administrator and run

webdriver-manager update --ignore_ssl

Please help.


回答1:


I have solved the issue as below,

// Update chrome alone
    webdriver-manager update --standalone=0 --chrome --alternate_cdn http://chromedriver.storage.googleapis.com/

// Update selenium alone
    webdriver-manager update --chrome=0 --standalone --alternate_cdn http://selenium-release.storage.googleapis.com/



回答2:


I was facing same issue and got the below error when running update chrome driver. Error: Got error Error: self signed certificate in certificate chain from https://chromedriver.storage.googleapis.com/2.21/chromedriver_win32.zip I manually downloaded the driver saved it as node_modules\protractor\selenium\chromedriver_2.21.exe and it worked. I was running it from my office network




回答3:


it actually works over http as well: http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar , just find-replace it inside the library.

Or download it manually to: node_modules/protractor/selenium




回答4:


i had same problem.

Solution for me was updating node.js (best way to do it - just download latest version and install it).



来源:https://stackoverflow.com/questions/34719096/selenium-webdriver-manager-update-npm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!