Closed bartlee closed 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.
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.
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.
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
)
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.
@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.
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.