0

I started learn Robotframework. Installed Python, pip and all necessary libraries (on Win10x64). I wrote some simple script just for testing:

*** Settings ***
Library  SeleniumLibrary

*** Test Cases ***
Test title "Amazon"
    Open Browser    http://www.amazon.com chrome

But when I trying to run it I receive an error:

# robot e:\Test\dummy\test.robot
[ ERROR ] Error in file 'e:\Test\dummy\test.robot': Importing test library 'SeleniumLibrary' failed: ValueError: invalid literal for int() with base 10: '0a1'
Traceback (most recent call last):
  File "c:\program files (x86)\python36-32\lib\site-packages\SeleniumLibrary\__init__.py", line 22, in <module>
    from SeleniumLibrary.base import DynamicCore
  File "c:\program files (x86)\python36-32\lib\site-packages\SeleniumLibrary\base\__init__.py", line 17, in <module>
    from .context import ContextAware
  File "c:\program files (x86)\python36-32\lib\site-packages\SeleniumLibrary\base\context.py", line 17, in <module>
    from SeleniumLibrary.utils import escape_xpath_value
  File "c:\program files (x86)\python36-32\lib\site-packages\SeleniumLibrary\utils\__init__.py", line 21, in <module>
    from .seleniumversion import SELENIUM_VERSION
  File "c:\program files (x86)\python36-32\lib\site-packages\SeleniumLibrary\utils\seleniumversion.py", line 23, in <module>

    major, minor, micro = int(major), int(minor), int(micro)
PYTHONPATH:
  C:\Program Files (x86)\Python36-32\Scripts\robot.exe
  c:\program files (x86)\python36-32\python36.zip
  c:\program files (x86)\python36-32\DLLs
  c:\program files (x86)\python36-32\lib
  c:\program files (x86)\python36-32
  c:\program files (x86)\python36-32\lib\site-packages
  c:\program files (x86)\python36-32\lib\site-packages\selenium-4.0.0a1-py3.6.egg
  c:\program files (x86)\python36-32\lib\site-packages\win32
  c:\program files (x86)\python36-32\lib\site-packages\win32\lib
  c:\program files (x86)\python36-32\lib\site-packages\Pythonwin
==============================================================================
Test
==============================================================================
Test title "Amazon"                                                   | FAIL |
No keyword with name 'Open Browser' found.
------------------------------------------------------------------------------
Test                                                                  | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================

PATH is OK, all necessary lib is installed. Python ver is 3.6.4

# pip freeze
appdirs==1.4.3
beautifulsoup4==4.8.0
certifi==2018.1.18
chardet==3.0.4
decorator==4.4.0
docutils==0.14
idna==2.6
psutil==5.4.3
pypiwin32==220
requests==2.18.4
robotframework==3.1.2
robotframework-selenium2library==3.0.0
robotframework-seleniumlibrary==3.3.1
selenium==4.0.0a1
soupsieve==1.9.2
tqdm==4.32.2
urllib3==1.22
webdrivermanager==0.7.4

Can someone explain me where is problem? 3 hours in Google does not helped

1
  • try to import Selenium2Library Commented Jul 21, 2019 at 14:32

2 Answers 2

1

Probably the selenium version does not match the one required by your robotframework-seleniumlibrary.

robotframework-seleniumlibrary==3.3.1
selenium==4.0.0a1

You should either install the 4.0 robotframework-seleniumlibrary, which is just an alpha version.

Or best would be to install the selenium 3.141.0 for your robotframework-seleniumlibrary 3.3.1.

robotframework-seleniumlibrary==3.3.1
selenium==3.141.0
Sign up to request clarification or add additional context in comments.

Comments

0

The below configuration worked :

Python Version on Windows 10 :

Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32

SeleniumLibrary Version :

robotframework-seleniumlibrary==4.3.0 
selenium (3.141.0)

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.