7

I am quite new to Robot Framework and I could use some help.

I'm using Ubuntu 14. And I have installed Robot following these steps:

# Python package management tool pip.
sudo apt-get install python2.7-dev
sudo apt-get install python-setuptools
sudo apt-get install python-pip

# wxPython
sudo apt-get install python-wxgtk2.8
sudo apt-get install python-wxversion

# Setting up actual robotframework + ide + selenium library.
sudo pip install robotframework
sudo pip install robotframework-ride
sudo pip install robotframework-seleniumlibrary

I use python ride.py (or sudo python ride.py) and the framework runs. Also some simple tests run. But in other cases I get errors because of library dependencies, eg: ImportError: No module named Selenium2Library (but also others)

When I install the libraries (using sudo -H pip install robotframework-selenium2library) I get the following:

Requirement already satisfied (use --upgrade to upgrade): robotframework-selenium2library in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): decorator>=3.3.2 in /usr/local/lib/python2.7/dist-packages (from robotframework-selenium2library)
Requirement already satisfied (use --upgrade to upgrade): selenium>=2.32.0 in /usr/local/lib/python2.7/dist-packages (from robotframework-selenium2library)
Requirement already satisfied (use --upgrade to upgrade): robotframework>=2.6.0 in /usr/local/lib/python2.7/dist-packages (from robotframework-selenium2library)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.8.1 in /usr/local/lib/python2.7/dist-packages (from robotframework-selenium2library)
Cleaning up...

So it looks like the libraries are installed, but are not seen. Do you believe is permissions? Do you think they should be installed in specific directory so that they can be accessed?

Any idea is welcome! Thank you in advance :)

5
  • 1
    Are you getting the error in Python 2 or 3?
    – user423626
    Jun 1, 2016 at 8:53
  • 1
    I use Python 2.7.6 Jun 1, 2016 at 8:54
  • Can you try sudo pip install robotframework-selenium2library (i.e., drop -H) and see if that helps?
    – edwinksl
    Jun 1, 2016 at 8:57
  • well it gives me the same result that the requirement is already satisfied. I was wondering whether I should clean up everything and installed them again? Jun 1, 2016 at 8:59
  • 1
    @EftychiaThomaidou Probably a good idea to try again. Also, can you redo the whole process in a virtualenv instead? I would discourage using sudo pip whenever possible.
    – edwinksl
    Jun 1, 2016 at 9:03

1 Answer 1

4

I had to enable the library for my own user. The flag: --user, did the trick for me.

sudo pip uninstall robotframework-selenium2library
pip install --user robotframework-selenium2library

But without first uninstalling it, I would get requirement already satisfied message.

2
  • tnx for the documentation. I was given that answer by somebody and that worked for me so i post it for other people to see as well and mark as correct. Is that wrong? No need for reputation here. >>As the author of the question, you have an additional option: accepting an answer that you believe is the best solution to your problem Jun 21, 2016 at 9:58
  • 1
    You can always change the accept to another answer if someone posts better one. But current answer is fine and by accepting it will be easy to find this solution by other.
    – user.dz
    Jun 21, 2016 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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