pose / webdriver-manager

Fork of Protactor's webdriver-manager as an standalone Node.js module.
22 stars 17 forks source link

Added --chromedriver-nw as acceptable CLI installable #14

Closed twolfson closed 9 years ago

twolfson commented 9 years ago

As mentioned in #13, when we tried to use the new --chromedriver-nw option, we saw that it was downloading the defaults (e.g. Selenium standalone and normal Chromedriver). Upon debugging, we found that we were filtering out --chromedriver-nw as an unrecognized option.

In this PR:

New successful log message:

$ bin/webdriver-manager update --chromedriver-nw
Updating selenium standalone
downloading http://selenium-release.storage.googleapis.com/2.46/selenium-server-standalone-2.46.0.jar...
Updating chromedriver (for nwjs)
downloading http://dl.nwjs.io/v0.12.2/chromedriver-nw-v0.12.2-linux-x64.tar.gz...
Updating chromedriver
downloading http://chromedriver.storage.googleapis.com/2.16/chromedriver_linux64.zip...
chromedriver_2.16.zip downloaded to /home/todd/github/webdriver-manager/selenium/chromedriver_2.16.zip
/home/todd/github/webdriver-manager/selenium/chromedriver_2.16.zip /home/todd/github/webdriver-manager/selenium
selenium-server-standalone-2.46.0.jar downloaded to /home/todd/github/webdriver-manager/selenium/selenium-server-standalone-2.46.0.jar
chromedriver-nw-v0.12.2-linux-x64.tar.gz downloaded to /home/todd/github/webdriver-manager/selenium/chromedriver-nw-v0.12.2-linux-x64.tar.gz
The following files were installed: /home/todd/github/webdriver-manager/selenium/selenium-server-standalone-2.46.0.jar /home/todd/github/webdriver-manager/selenium/chromedriver /home/todd/github/webdriver-manager/selenium/chromedriver
twolfson commented 9 years ago

However, upon further review. We seem to be downloading Selenium standalone and the standard Chromedriver when we only want to download 1 of them. I am going to look into that.

twolfson commented 9 years ago

Ah, I was throwing myself off with the defaults. The following installs how I want it to (skips default Chrome install)

$ bin/webdriver-manager update --standalone true --chrome false --chromedriver-nw true
Updating selenium standalone
downloading http://selenium-release.storage.googleapis.com/2.46/selenium-server-standalone-2.46.0.jar...
Updating chromedriver (for nwjs)
downloading http://dl.nwjs.io/v0.12.2/chromedriver-nw-v0.12.2-linux-x64.tar.gz...
selenium-server-standalone-2.46.0.jar downloaded to /home/todd/github/webdriver-manager/selenium/selenium-server-standalone-2.46.0.jar
chromedriver-nw-v0.12.2-linux-x64.tar.gz downloaded to /home/todd/github/webdriver-manager/selenium/chromedriver-nw-v0.12.2-linux-x64.tar.gz
The following files were installed: /home/todd/github/webdriver-manager/selenium/selenium-server-standalone-2.46.0.jar /home/todd/github/webdriver-manager/selenium/chromedriver
twolfson commented 9 years ago

Found another regression; running the script with our --chrome false was causing chromedriver-nw detection to fail. We patched that up with another fallback.

pose commented 9 years ago

@twolfson Thanks for these fixes. Also, I plan to address that it might not be working on Windows (I don't think I'm handling the .exe case right).

pose commented 9 years ago

@twolfson Merged, will create a separte issue for Windows and chromedriver-nw. Check 7.0.1 to get the latest update. Thanks!

twolfson commented 9 years ago

Wonderful, thanks for landing this so quickly =) If you are interested in seeing it in action, the PR is:

https://github.com/plaidchat/plaidchat/pull/114

pose commented 9 years ago

@twolfson That's awesome. I was not aware of that project. Keep me posted for anything else you need from upstream.