Giter Site home page Giter Site logo

Comments (13)

ollisal avatar ollisal commented on May 21, 2024 17

@cnishina yeah, you can get a specific Chromedriver version installed by using the --versions.chrome flag. But as @darabos said, Protractor still tries to find and launch the default version as specified by config.json when you run tests using directConnect: true.

The only way to make Protractor use a different version (without altering the npm-installed config.json) is to set the chromeDriver setting in the config. But that requires you to specify a full path to the binary, even accounting for platform differences. In essence, you need to have something like this in your Protractor config:

chromeDriver: '../node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24' + (process.platform.indexOf('win') === 0 ? '.exe' : '')

(With the .. prefix dependent on where your Protractor config is situated in).

So I don't think this is simply a documentation issue. Shouldn't webdriver-manager abstract away exactly these kinds of details (where to download, filename, etc)?

Maybe it should be possible to specify the versions or a full path to a config file via environment variables? This way you wouldn't need to pass the version through all layers in Protractor or whatever is immediately calling webdriver-manager.

from webdriver-manager.

rkrisztian avatar rkrisztian commented on May 21, 2024 13

Works for me in a project generated with Angular CLI 1.0.0 (Using Protractor 5.1.1), and the following npm script:

    "e2e": "ng e2e --webdriver-update false",
    "pree2e": "webdriver-manager update --versions.chrome=2.28"

from webdriver-manager.

cnishina avatar cnishina commented on May 21, 2024 3

You should use --versions.chrome or you could override the value in your protractor configuration file. The chromedriver experience that you are facing is probably related to Issue #93. The file name has changed slightly on OSX.

  • If you are using a selenium address in your configuration file, the chromedriver should work.

  • If you are using direct connect, you should run webdriver-manager update locally in your project. I like to do this in the package.json "scripts".

    {
      "dependencies": {
        "protractor": "^4.0.8"
      },
      "scripts": {
        "pretest": "webdriver-manager update --versions.chrome=2.23"
        "test": "protractor protractor.conf.js"
      }
    }
    

Hope that helps. Anyway, I agree that we could have better documentation.

from webdriver-manager.

rossjohnson90 avatar rossjohnson90 commented on May 21, 2024 3

I'm having a similar issue - under the selenium file I only have chomedriver 2.26 I've updated the config.json to 2.26 and the config.json file under "built" to 2.26 but when I run webdriver-manager start I see
11:22:43] I/start - java -Dwebdriver.chrome.driver=C:\Users\ross.johnson\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.27.exe -Dwe bdriver.gecko.driver=C:\Users\ross.johnson\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.14.0.exe -jar C:\Users\ross.johnson\AppDat a\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.1.0.jar -port 4444
the file its point to for chromedriver 2.27 doesnt even exist so I find it strange its still trying to run 2.27 and that there is no error

I've also removed any mention of 2.27 from update-config.json

from webdriver-manager.

hsuh avatar hsuh commented on May 21, 2024

Sorry if this is the wrong thread to ask questions. How do I change the webdriver default chrome driver?

I've got 3 different drivers downloaded 2.2, 2.3 and 2.4 but the default is set to 2.2 and I can't seem to be able to figure out how to switch the default driver. Help!

from webdriver-manager.

obie avatar obie commented on May 21, 2024

bump

from webdriver-manager.

cnishina avatar cnishina commented on May 21, 2024

@ollisal this has been fixed. directConnect uses the selenium/update-config.json file to find the last driver downloaded. The important thing to note is that it is the last one and not the latest file available.

from webdriver-manager.

mwsessom avatar mwsessom commented on May 21, 2024

+1

from webdriver-manager.

rbz518 avatar rbz518 commented on May 21, 2024

+1

from webdriver-manager.

majinliang123 avatar majinliang123 commented on May 21, 2024

+1

from webdriver-manager.

cnishina avatar cnishina commented on May 21, 2024

The documentation exists. Please see: https://github.com/angular/webdriver-manager/blob/master/docs/versions.md

I probably should have closed this issue after I added the versions.md. I am going to close this with cb3b70f. If you believe this is still an issue after reading the documentation, feel free to open a new issue.

from webdriver-manager.

snehalbhalerao15 avatar snehalbhalerao15 commented on May 21, 2024

After running Webdiver-manager update --versions.chrome=75.1.0, getting below error

Error code:135
Error msg: Could not find update-config. Json. Run webdriver-manager update to download

Please suggest on this..

from webdriver-manager.

cnishina avatar cnishina commented on May 21, 2024

That is as designed, 75.1.0 is not a fully qualified chromedriver version. This documentation was moved to https://github.com/angular/webdriver-manager/blob/legacy/docs/versions.md and the list of chromedrivers that could be downloaded are chromedriver.storage.googleapis.com

You should find something that matches your major version of your Chrome browser version.

from webdriver-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.