![](/img/trans.png)
[英]Error in file: on line 4: Importing test library 'Selenium2library' failed: ModuleNotFoundEr ror: No module named 'Selenium2library'
[英]Importing Selenium2Library
導入Selenium2Library用於Robotframework時卡住了。
當嘗試驗證我的Selenium2Library安裝時,在Python shell中收到以下錯誤
>>> import Selenium2Library
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import Selenium2Library
File "C:\Users\user\AppData\Local\Programs\Python\Python35-32\lib\site-packages\robotframework_selenium2library-1.7.4-py3.5-win32.egg\Selenium2Library\__init__.py", line 2, in <module>
from keywords import *
ImportError: No module named 'keywords'
>>>
我之前在使用其他模塊時遇到此錯誤,並且能夠使用easy_install(模塊名稱)修復此錯誤,但是對關鍵字執行此操作可得到此結果
Searching for keywords
Reading https://pypi.python.org/simple/keywords/
Couldn't find index page for 'keywords' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for keywords
error: Could not find suitable distribution for Requirement.parse('keywords')
任何建議都非常值得贊賞,因為我不是真正的程序員,而是測試人員。 謝謝
到目前為止,Selenium2Library與Python 3.5不兼容。 請改用Python 2.7。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.