zs-zs / grunt-selenium-standalone

Grunt tasks for running a standalone Selenium server using the popular selenium-standalone package
MIT License
8 stars 9 forks source link

Server start expects latest version even if older version is specified #1

Closed Liam-Ryan closed 8 years ago

Liam-Ryan commented 9 years ago

Hi, thanks for your great module. I noticed the following bug while setting up for first time use.

I'm using load-grunt-contrib which may have contributed, also it's possible there's a version property for a start task that I missed in the documentation?

Note that removing the versions for server and drivers means that selenium_standalone downloads the latest server and works fine as the expected .jar is found.

  1. selenium_standalone.js contents =

module.exports= { dev: { seleniumVersion: '2.45.0', seleniumDownloadURL: 'http://selenium-release.storage.googleapis.com', drivers: { chrome: { version: '2.15', arch: process.arch, baseURL: 'http://chromedriver.storage.googleapis.com' }, ie: { version: '2.45', arch: process.arch, baseURL: 'http://selenium-release.storage.googleapis.com' } } }
}

  1. Aliases.js = module.exports = { 'pro': [ 'selenium_standalone:dev:install', 'selenium_standalone:dev:start', 'protractor:test', 'selenium_standalone:dev:stop' ] }
  2. Run grunt pro task

Expected behaviour - A) selenium_standalone downloads and installs selenium 2.45 B) selenium_standalone starts selenium 2.45

Actual behaviour - A) 2.45 is downloaded and installed succesfully B) selenium_standalone assumes you want to run the latest version rather than named version and tries to run that

Running "selenium_standalone:dev:install" (selenium_standalone) task

Running "selenium_standalone:dev:start" (selenium_standalone) task

Error: Missing \node_modules\grunt-selenium-standalone\node_modules\selenium-standalone.selenium\s um-server\2.47.1-server.jar Warning: Task "selenium_standalone:dev:start" failed. Use --force to continue.

Istenes commented 8 years ago

+1

JSMike commented 8 years ago

This PR resolves the issue, the target selenium version wasn't getting passed in to the selenium-standalone start task.

https://github.com/zs-zs/grunt-selenium-standalone/pull/3

JSMike commented 8 years ago

@zs-zs I noticed you haven't been active on github lately, let me know if you need help maintaining this.

rcorrear-borderguru commented 8 years ago

@zs-zs is there any chance this could be merged please? As far as I can tell this solves all my needs for Selenium but this issue is quite annoying

JSMike commented 8 years ago

@zs-zs I've made some additional changes to my PR to fix some issues with the webdriver versions not downloading properly.

@rcorrear-borderguru, @Liam-Ryan, and anyone else: While @zs-zs is MIA, you can update your package.json to use my repo, I've tagged it with version 0.1.5:

"grunt-selenium-standalone": "git+https://github.com/JSMike/grunt-selenium-standalone.git#v0.1.5"
JamesMGreene commented 8 years ago

Also running into this.

@zs-zs, please merge @JSMike's PR #3!

JSMike commented 8 years ago

@JamesMGreene I was just added as a contributor by @zs-zs . I'll review the current state of requested changes and push up the new branch over the weekend.

JamesMGreene commented 8 years ago

@JSMike: Yeah, me too. I reached out to @zs-zs via email this morning to request that I be added as a collaborator on GitHub and a maintainer on NPM. Sounds like he did the same for you. :+1:

zs-zs commented 8 years ago

@JSMike @JamesMGreene Yes, I'm back, sorry for the outage guys. :( James, I could easily find your user on NPM so I added you, but I don't know your username, Mike. Please send it to me or to James in email so we can add you too. And last but not least: thanks for your contributions! :+1: