Skip to content

Selenium version number can also contain letters #1380

@aaltat

Description

@aaltat

If Selenium pre-release is installed, it will cause exception in the SeleniumLibrary:

'/path/to/test.robot': Importing test library 'SeleniumLibrary' failed: ValueError: invalid literal for int() with base 10: '0a1'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/SeleniumLibrary/__init__.py", line 25, in <module>
    from SeleniumLibrary.base import DynamicCore, LibraryComponent
  File "/usr/local/lib/python2.7/dist-packages/SeleniumLibrary/base/__init__.py", line 17, in <module>
    from .context import ContextAware
  File "/usr/local/lib/python2.7/dist-packages/SeleniumLibrary/base/context.py", line 17, in <module>
    from SeleniumLibrary.utils import escape_xpath_value
  File "/usr/local/lib/python2.7/dist-packages/SeleniumLibrary/utils/__init__.py", line 20, in <module>
    from .seleniumversion import SELENIUM_VERSION
  File "/usr/local/lib/python2.7/dist-packages/SeleniumLibrary/utils/seleniumversion.py", line 23, in <module>
    major, minor, micro = int(major), int(minor), int(micro)

This is because the micro part of the version number contains a letter like 0a1 and the int() fails. Need to fix it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions