0

Have got stuck importing Selenium2Library for Robotframework.

When trying to validate my installation of Selenium2Library I get the following error in the Python shell

>>> import Selenium2Library
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import Selenium2Library
  File "C:\Users\user\AppData\Local\Programs\Python\Python35-32\lib\site-packages\robotframework_selenium2library-1.7.4-py3.5-win32.egg\Selenium2Library\__init__.py", line 2, in <module>
    from keywords import *
ImportError: No module named 'keywords'
>>> 

I had this error before with a different module and was able to fix it using easy_install (module name) however doing this for keywords gives this result

Searching for keywords
Reading https://pypi.python.org/simple/keywords/
Couldn't find index page for 'keywords' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for keywords
error: Could not find suitable distribution for Requirement.parse('keywords')

Any advice greatly appreciated as I'm not really a programmer but a tester. Thanks

SvbZ3r0
  • 638
  • 4
  • 19

2 Answers2

1

There is a pre-release package, which works fine with Python 3.4, here that you may install with:

pip install --pre -U https://github.com/HelioGuilherme66/robotframework-selenium2library/archive/v1.8.0b3.tar.gz

The Pull Request is waiting for merge.

Helio
  • 3,322
  • 1
  • 14
  • 23
  • I was able to update to robotframework 3, python 3 and the above Selenium2Library. Ensure it is the version `v1.8.0b3.tar.gz` not the `...0b1` version that is around on the net. – eratech Jul 22 '16 at 02:21
0

As of now, Selenium2Library is not compatible with Python 3.5. Please use Python 2.7 instead.

Issue for adding Python 3 support

ombre42
  • 2,344
  • 15
  • 21