我無法在Robot Framework中使用Selenium2Library。它引發以下錯誤:無法在Robot Framework中使用Selenium2Library。 ImportError:沒有名爲Selenium2Library的模塊錯誤
C:\RFW>jybot.bat SW_Installation.robot
[ ERROR ] Error in file 'C:\RFW\SW_Installation.robot': Importing test library '
Selenium2Library' failed: ImportError: No module named Selenium2Library
Traceback (most recent call last):
None
PYTHONPATH:
C:\RFW\SWInstall.sikuli
C:\RFW\robot\libraries
C:\RFW
C:\RFW\sikulixapi.jar\Lib
C:\RFW\Lib
C:\RFW\jython-standalone-2.7-b3.jar\Lib
__classpath__
__pyclasspath__/
.
CLASSPATH:
C:\RFW\jython-standalone-2.7-b3.jar
C:\RFW\sikulixapi.jar
我的機器人文件是:
***Settings***
Library Selenium2Library
Library Install.Installation WITH NAME Installation
*** Variables ***
${NONE} none
***Test Cases***
testcase1
ClickInstallBatFile
sleep 90
Click Button 885,523
我曾嘗試在Python交互shell導入庫。它的工作如預期如下所示:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\test>python
ActivePython 2.7.8.10 (ActiveState Software Inc.) based on
Python 2.7.8 (default, Jul 2 2014, 19:50:44) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import Selenium2Library
>>> import SeleniumLibrary
>>>
任何人都可以提供任何線索嗎?
感謝, 庫馬爾
是的,你可以在python中導入庫。但是你使用的是不關心你的python庫的jybot。 –
這可能是http://stackoverflow.com/q/29369339/7432的副本 –