How would I get the browser version being used?
>>> from selenium import webdriver
>>> driver = webdriver.Firefox()
>>> print vers
While this may not quite answer the question above, this still could be useful to someone whose looking for a way to code a test based upon different behaviors they receive from different browsers (i.e. Firefox vs Chrome). I was looking for this at the time when I stumbled upon this thread, so I thought I'd add it in case it can help someone else.
On Python, if you're simply looking for the browser you're testing on (i.e. firefox, chrome, ie, etc..), then you could use...
driver.name
... in an if statement. This assumes you've already assigned driver to the web browser you're testing on (i.e. Firefox, Chrome, IE, etc..). However, if you're tasked with testing multiple versions of the same browser, you'll want something more to driver.version. Hope this helps someone out. I was looking for this solution when I found this thread, so I thought I'd add it just in case someone else needs it.