Element-34/py.saunter

SeleniumServer.py should not have hard-coded name of Selenium server .jar file

mmaypumphrey opened this issue · 2 comments

Line 55 of /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py.saunter-0.5-py2.7.egg/saunter/SeleniumServer.py contains a hard-coded Selenium server .jar filename, i.e.,

s = subprocess.Popen(['java', '-jar', 'third_party/selenium/selenium-server-standalone-2.0b2.jar'],

IMHO, it would be better to use something like "third_party/selenium/latest-selenium.jar" where the latter was a symbolic link to the desired .jar file within the third_party/selenium directory.

In 0.6 (which should be out tomorrow or the next day) changes the way the py.saunter handles the server. Pseudocode is roughly...

  • if the user has set in saunter.ini that it should control the server (there are situations where for instance something like puppet could control it) and the server isn't up
  • if the jar specified in saunter.ini doesn't exist, go fetch one (which remains hardcoded but will hopefully be fairly current) and stuff it in the system temp directory (if it isnt there already)

I'm trying to avoid actually shipping the jar. I've been toying with the idea of creating a separate python egg which would have it and then we'd know exactly where it is. But the jar is pretty darn big.

creating a new jar is the same amount of work as just bumping the version number of the jar. and with selenium releases slowing down some it shouldnt be that bad.