当我尝试在 RobotFramework 中运行测试用例时,出现以下错误。我安装了 Selenium2Library,但看起来 RF 找不到它。SeleniumLibrary 一切正常。
Selenium2Library 安装在 C:\Python27\lib\site-packages 中。我卸载并安装了几次以确保安装正确。安装过程中没有错误。
任何想法在哪里寻找问题?
这是错误:
c:\testing>pybot testone.txt
[ ERROR ] Error in file 'c:\testing\testone.txt' in table 'Settings': Importing test library 'Selenium2Library' failed: ImportError: No module named selenium
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\Selenium2Library\__init__.py", line 2, in <module>
from keywords import *
File "C:\Python27\lib\site-packages\Selenium2Library\keywords\__init__.py", line 3, in <module>
from _browsermanagement import _BrowserManagementKeywords
File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_browsermanagement.py", line 4, in <module>
from selenium import webdriver
PYTHONPATH:
C:\Python27\lib\site-packages\robot\libraries
C:\Python27\lib\site-packages
C:\Windows\system32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages\wx-2.8-msw-unicode