[英]Robot Framework: “Library” not found
My very first script in Robot with PyCharm tells me the following error message: 我在带PyCharm的机器人中的第一个脚本告诉我以下错误消息:
[ ERROR ] Error in file 'C:\Desktop\MyProjects\first_test\1stTest.robot': Setting variable 'Library' failed: Invalid variable name 'Library'.
The beginning of my script has nothing special, you can see it here: 我的脚本的开头没有什么特别的,您可以在这里看到它:
*** Settings ***
Documentation This is a simple robot example
Library Selenium2Library
*** Variables ***
${SERVER} http://google.com
${BROWSER} Chrome
${DELAY} 0
I installed selenium2library using pip without any problem or message error. 我使用pip安装了selenium2library,没有任何问题或消息错误。 Still in my code when I write in PyCharm, on the first line
Documentation
is displayed in orange, however Library
is displayed in different orange, like grayed out... 当我用PyCharm编写代码时,仍在我的代码中,第一行
Documentation
以橙色显示,但是Library
以不同的橙色显示,如变灰...
Can you help me with that? 你能帮我吗?
Is the above from one file and in that file EXACTLY how you have pasted above? 上面的内容是否来自一个文件,并且在该文件中恰好是您上面粘贴的方式? Is there more to it below perhaps including the text Library?
下面可能还有其他内容,包括文本库吗?
To my mind this error could only occur if you have Library in the variables section? 我认为只有在变量部分中有库的情况下才会出现此错误? Is your settings section correct?
您的设置部分正确吗? Perhaps some invalid syntax so it's not being properly considered?
也许是一些无效的语法,所以没有适当考虑它?
There should be only 1 space between Library and Selenium2Library. Library和Selenium2Library之间应该只有1个空格。 That should fix that
那应该解决
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.