Trouble installing Selenium2Library

426 views
Skip to first unread message

Matt Rossner

unread,
Feb 1, 2014, 4:15:04 PM2/1/14
to robotframe...@googlegroups.com
Hi,

Sorry if this is obvious but I'm new to Python and I'm having some issues getting Selenium2Library to work.

I'm running Mac OSX 10.9 (Mavericks). I had previously installed Macports for some other applications, it seems everything python is using brew, from what I've read it's not a good idea to have both installed. So I've been installing all the Robot stuff manually which generally is:
  • Download a tar
  • Untar it
  • python setup.py install

This all worked fine, I got the Selenium library installed and was able to run some basic tests. Although I then realized there's a Selenium 2 library which uses web driver which I am more familiar with. So I did the usual "python setup.py install" and it seemed to run ok (no error messages), but when I try to run a test (even the demo that comes with it I get this message:

[ ERROR ] Error in file '/Users/matt.rossner/Downloads/robotframework-selenium2library-1.5.0/demo/login_tests/resource.txt': Importing test library 'Selenium2Library' failed: ImportError: No module named Selenium2Library
Traceback (most recent call last):
  None
PYTHONPATH:
  /Library/Python/2.7/site-packages/robot/libraries
  /Library/Python/2.7/site-packages
  /usr/local/bin
  /usr/local/lib/wxPython-2.9.5.0/lib/python2.7/site-packages
  /usr/local/lib/wxPython-2.9.5.0/lib/python2.7/site-packages/wx-2.9.5-osx_cocoa
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
  /usr/local/lib/wxPython-2.9.5.0/lib/python2.7
  .
  /Users/matt.rossner/Downloads/robotframework-selenium2library-1.5.0

Ok so I looked in the paths listed under PYTHONPATH and it doesn't seem to be there. Actually in this path "/Library/Python/2.7/site-packages" I can see "SeleniumLibrary" is there but not #2.

So I don't know if #2 is actually installed, even though the installer script says it is. Maybe I need to uninstall #1, but not really sure how to do that. Guess I'll Google around on that for now, but if anyone here has a better explanation I would really appreciate that.

Thanks

Matt

Nicolae CHEDEA

unread,
Feb 2, 2014, 7:16:37 AM2/2/14
to robotframe...@googlegroups.com
Hi,

I have some idea about what your problem might be.
Selenium2Library has some dependencies. If you install it using your approach, you would also have to install those dependencies before:
- decorator-3.4.0
- selenium-2.39.0
You can install them like you installed Selenium2Library (untar them and run python setup.py install).

Regards,
Nicu.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/groups/opt_out.

Yogesh Bandgar

unread,
Feb 2, 2014, 10:51:36 AM2/2/14
to ni...@chedea.eu, robotframework-users
Hi Nicolae ,

Have u tried with Setup tools and Easy Install Command
Thanks
Yogesh
--
Thanks,
Yogesh

abhilash alwandi

unread,
Feb 5, 2014, 7:13:59 AM2/5/14
to robotframe...@googlegroups.com
if it doesnot work then,
Go for this :

http://www.activestate.com/activepython/downloads

And then try installing the selenium library.

Ed Manlove

unread,
Feb 5, 2014, 10:30:11 AM2/5/14
to robotframe...@googlegroups.com
Matt,

Did you resolve your issue? If not could you retry the "python setup.py install" command for the selenium2library and post the output.  That should have installed it under /Library/Python/2.7/site-packages. Also at the terminal you might try "which python" to verify you are using that, /Library/Python/2.7, python version (This should work under OSX but I'll note I am familiar with Linux and Windows and rarely used OSX).

Ed
--

Gilles Lenfant

unread,
Aug 6, 2014, 3:43:50 PM8/6/14
to robotframe...@googlegroups.com

Le samedi 1 février 2014 22:15:04 UTC+1, Matt Rossner a écrit :
Hi,

Sorry if this is obvious but I'm new to Python and I'm having some issues getting Selenium2Library to work.

Hi,

Why did you not simply "pip install robotframework-selenium2library" ?

It worked for me like a charm on OSX Mavericks + MacPorts Python 2.7

Ah ! You need Firefox  too, I don't think Safari is supported.

Ss Raghavan

unread,
Aug 16, 2014, 12:39:41 PM8/16/14
to robotframe...@googlegroups.com
For selenium 2 u need to install decorator which is base for webdriver and then install selenium2library . Now Firefox browser 28/29/31 will work without any issues. To cross verify whether u have installed successfully type

Pip list - output will be all installed python ext along with its version

Reply all
Reply to author
Forward
0 new messages