nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.79k stars 1.31k forks source link

Unable to access jarfile #15

Closed bartlee closed 10 years ago

bartlee commented 10 years ago

I followed the instructions for windows but receive the error: Unable to access jarfile ./bin/selenium-server-standalone-2.39.0.jar

Why is it trying to find it at ./bin? I tried adding it to my classpath, but the getting started instructions didn't take me far enough, I am new to node, so if this is normal node stuff that I don't understand please forgive me.

bartlee commented 10 years ago

Nevermind, I thought Selenium was supposed to be started by running nightwatch. I see now that it is a server process and needs to be started independantly.

beatfactor commented 10 years ago

Nightwatch should be able to start/stop the selenium server if you tell it to do so. Have you defined your settings.json file? Have a look at the http://nightwatchjs.org/guide - configuration file details.

wayneseymour commented 10 years ago

I couldn't get this to work on WIN either. I've not tried on my MAC. I can if this gets re-opened in the future.

ghost commented 7 years ago

So, I know this question is ancient, but I had this issue not so long ago. I got around it by ensuring all the jars I needed to touch were outside node_modules. I was having breakages when I tried to run anything touching jars through the npm run code path. (i.e. java -jar ./node_modules/.../some.jar had the same problem as nightwatch mytests.js)

qodesmith commented 7 years ago

My solution was fixing the server_path in nightwatch.conf.js pointing to the jar file. Our path was pointing to an old version. Replaced it with selenium-server-standalone-3.4.0.jar and it's working. It was essentially looking for a file that wasn't there. Just navigate to node_modules/selenium-server-standalone-jar/jar and see what your file's name is.

lmiller1990 commented 6 years ago

@qodesmith I had the same problem, and this solved it for me. I was using nightwatch that comes preset with Vue.js's vue-cli, if anyone else finds this from a similar search.