How do I check version of Selenium I am using?

18,933 views
Skip to first unread message

Steve Thomas

unread,
Apr 5, 2014, 5:19:58 PM4/5/14
to obey-the-test...@googlegroups.com
So I am going back to the start and trying using Django 1.7 and I want to make sure I have the correct versions of software;

So I wrote a simple python script to check:
import django
print("Django Version: %s" % (django.get_version()))
from selenium import webdriver
from selenium import selenium
print ("Selenium webdriver Version: %s" % (webdriver.__version__))


Which prints:
Django Version: 1.7b1
Selenium webdriver Version: 2.40.0 

My only concerns are:
  1. reading the notes in http://chimera.labs.oreilly.com/books/1234000000754/pr02.html  it says I should use version 2.39 for Selenium and it shows version 2.40.0 of Selenium webdriver
  2. I couldn't figure out how to print the version of Selenium.  I tried  selenium.__version__ but that didn't work.
I will plod ahead, any comments/suggestions welcome.

Thanks,
Stephen

Harry Percival

unread,
Apr 5, 2014, 6:40:42 PM4/5/14
to Steve Thomas, obey-the-test...@googlegroups.com
Hi Steve,


You can use `pip3 freeze` to print out the names + version numbers of all currently installed packages...

Don't worry too much about the selenium version.  the bug that affects versions 40 and 41 is only an issue when you're running your tests under xvfb, which only happens on the jenkins server that we build in the CI chapter, right at the end of the book... when you get to that chapter, you can switch selenium versions by doing a `pip3 install selenium==2.39`

I'm interested to hear how you get on with the book this time round!  particularly what you think about chapters 5 and 6...

hp


--
You received this message because you are subscribed to the Google Groups "Obey the testing goat! Test-Driven Web Development with Python book" group.
To unsubscribe from this group and stop receiving emails from it, send an email to obey-the-testing-go...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
------------------------------
Harry J.W. Percival
------------------------------
Twitter: @hjwp
Mobile:  +44 (0) 78877 02511
Skype:         harry.percival

Steve Thomas

unread,
Apr 5, 2014, 11:00:49 PM4/5/14
to obey-the-test...@googlegroups.com, Steve Thomas, hj...@cantab.net
Harry,

Thanks pip3 freeze worked great.  My plan is to get through at least Chapters 5 and 6 before PyCon where I'll be taking your TDD for Web Apps tutorial.

Cheers,
Stephen
To unsubscribe from this group and stop receiving emails from it, send an email to obey-the-testing-goat-book+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages