安装的版本信息:
>pip list AutoItLibrary (1.1) decorator (3.4.0) pip (1.5.6) pywin32 (220) robotframework (2.8.7) robotframework-ride (1.2.3) robotframework-selenium2library (3.0.0) robotframework-seleniumlibrary (3.3.1) selenium (3.141.0) setuptools (23.1.0) urllib3 (1.25.3)
Log:
20190718 13:12:07.271 [WARN]: Importing test library "Selenium2Library" failed Traceback (most recent call last): Importing test library 'Selenium2Library' failed: ImportError: cannot import name is_string Traceback (most recent call last): File "D:Python27libsite-packagesSelenium2Library\__init__.py", line 19, in <module> from SeleniumLibrary import SeleniumLibrary File "D:Python27libsite-packagesSeleniumLibrary\__init__.py", line 22, in <module> from SeleniumLibrary.base import DynamicCore File "D:Python27libsite-packagesSeleniumLibraryase\__init__.py", line 17, in <module> from .context import ContextAware File "D:Python27libsite-packagesSeleniumLibraryasecontext.py", line 17, in <module> from SeleniumLibrary.utils import escape_xpath_value File "D:Python27libsite-packagesSeleniumLibraryutils\__init__.py", line 22, in <module> from .types import is_falsy, is_noney, is_string, is_truthy, PY3 File "D:Python27libsite-packagesSeleniumLibraryutils ypes.py", line 21, in <module> from robot.utils import is_string PYTHONPATH: D:Python27libsite-packages obotidelib obotlibraries D:Python27libsite-packages obotidelib D:Python27libsite-packageswx-2.8-msw-unicode D:Python27libsite-packageswx-2.8-msw-unicode D:Python27libsite-packagessetuptools-23.1.0-py2.7.egg D:Python27libsite-packagesdecorator-3.4.0-py2.7.egg C:windowsSYSTEM32python27.zip D:Python27DLLs D:Python27lib D:Python27libplat-win D:Python27liblib-tk D:Python27 D:Python27libsite-packages D:Python27libsite-packageswin32 D:Python27libsite-packageswin32lib D:Python27libsite-packagesPythonwin . C:UserschenjyDesktop D:Python27libsite-packages obotidespec File "D:Python27libsite-packages obotidespeclibrarymanager.py", line 76, in _fetch_keywords return get_import_result(path, library_args) File "D:Python27libsite-packages obotidespeclibraryfetcher.py", line 20, in get_import_result lib = TestLibrary(path, args) File "D:Python27libsite-packages obotidelib obot unning estlibraries.py", line 37, in TestLibrary libcode = importer.import_class_or_module(name) File "D:Python27libsite-packages obotidelib obotutilsimporter.py", line 64, in import_class_or_module self._raise_import_failed(name, err) File "D:Python27libsite-packages obotidelib obotutilsimporter.py", line 102, in _raise_import_failed raise DataError(' '.join(msg))