Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selenium download ensure #34

Open
TroutZen opened this issue Sep 20, 2016 · 3 comments
Open

selenium download ensure #34

TroutZen opened this issue Sep 20, 2016 · 3 comments

Comments

@TroutZen
Copy link

I can't seem to get this script to work

require('selenium-download').ensure('./bin', function(error) {  
   if (error) {
     return console.log(error);
   } else {
     console.log('✔ Selenium & Chromedriver downloaded to:', './bin');
   }
});
[testium] grabbing selenium standalone server 2.53.0
Starting selenium server... There was an error while starting the Selenium server:

Error: Invalid or corrupt jarfile ./node_modules/nightwatch/bin/selenium.jar

Seems to be trying to start the server before the installation has completed? Is there a way to defer this in node?

@nelsonic
Copy link
Member

nelsonic commented Sep 20, 2016

Hi @TroutZen thanks for feedback!
Yes, the .ensure only checks that the driver has been downloaded.
We have a postinstall command in our package.json which runs the require('selenium-download').ensure( after all node_modules have been installed, that way the first time you attempt to run nightwatch both selenium.jar and chromedriver have already been installed.
see:

@jpfernandezl
Copy link

jpfernandezl commented Dec 8, 2016

postinstall does not download the jar file into the bin folder on windows 8

@nelsonic
Copy link
Member

nelsonic commented Dec 8, 2016

@jpfernandezl thanks very much for the feedback! (_it's meant to be cross-platform... but we do not maintain the selenium-download package, so please inform our friends @groupon by raising an issue: https://github.com/groupon/selenium-download/issues explain exactly what OS version and method you used. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants