14

I want to check the version of Selenium API I am using. I tried googling it, but couldn't find out.

7
  • could you tell us when you have installed that ? – rɑːdʒɑ Feb 26 '13 at 12:58
  • 2-3 months ago, may be. not sure – vipin8169 Feb 26 '13 at 13:00
  • may be this can help you , honestly I too havent found but this what I have got docs.seleniumhq.org/download . – rɑːdʒɑ Feb 26 '13 at 13:02
  • found it finally – vipin8169 Feb 26 '13 at 13:09
  • 1
    I am glad that you have got and thanks for mentioning the right way to figure it out.I am sure that this answer will Helpful to future users who going to need this. – rɑːdʒɑ Feb 26 '13 at 13:15
13

Here's how i checked for the version of selenium in Python.

>>> import selenium    
>>> help (selenium)
Help on package selenium:

NAME
    selenium

FILE
    c:\python27\lib\site-packages\selenium\__init__.py

DESCRIPTION
    # Licensed to the Software Freedom Conservancy (SFC) under one
    # or more contributor license agreements.  See the NOTICE file
    # distributed with this work for additional information
    # regarding copyright ownership.  The SFC licenses this file
    # to you under the Apache License, Version 2.0 (the
    # "License"); you may not use this file except in compliance
    # with the License.  You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing,
    # software distributed under the License is distributed on an
    # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    # KIND, either express or implied.  See the License for the
    # specific language governing permissions and limitations
    # under the License.

PACKAGE CONTENTS
    common (package)
    selenium
    webdriver (package)

DATA
    __version__ = '2.48.0'

VERSION
    2.48.0
6

You can also run locate selenium in the terminal, and you can see the version number in the file names.

5
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>> print selenium.__version__
3.3.0
3
  • 3
    Or as a single command: python -c 'import selenium; print selenium.__version__' – David Foerster Mar 14 '17 at 17:07
  • A bit more text to accompany your answer is needed. – Phil UK Mar 15 '17 at 1:51
  • print( selenium.__version__ ) for Python3... yes, it's very very very very very very very very very very very very very very obvious. But might help someone! – mike rodent Jan 31 '20 at 18:22
4

You would have referenced the jar's in your IDE (Eclipse or whatever you are using maybe). Check build path libraries. See the ScreenShot below:-

enter image description here

1

Another way of determining the Selenium version is through the command line:

dpkg-query --list '*selenium*'

Output:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                Version                        Architecture                   Description
+++-===================================================-==============================-==============================-===========================================================================================================
ii  python-selenium                                     2.48.0+dfsg1-2                 all                            Python bindings for Selenium
1

Just for completeness - If you have selenium installed with pip you can do:

pip freeze

and see which version you have installed, if any.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.