简体   繁体   English

机器人框架:未找到“库”

[英]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.

相关问题 Robot Framework中的DateTime库 - DateTime Library in Robot Framework 在 Windows 上找不到机器人框架 wxPython - Robot Framework wxPython Not Found on Windows 没有找到 BrowserMobProxy With Robot Framework 的日志条目 - No log entries found for BrowserMobProxy With Robot Framework 机器人框架selenium2library的python版本(Windows10) - python version for robot framework selenium2library (Windows10) 适用于Robot Framework的Mongo Db扩展库返回错误记录 - Mongo Db extended library for Robot Framework returns wrong records Robot Framework - 使用 PostgreSQL 从数据库中执行 Sql 脚本关键字 - Robot Framework - Execute Sql Script Keyword from Data Library with PostgreSQL 无法在ubuntu selenium2library上安装机器人框架 - robot framework installation on ubuntu selenium2library cannot Robot Framework 数据库 Library - 执行 SQL 脚本关键字问题 - Robot Framework database Library - Execute SQL Script Keyword Issue 无法安装适用于Python 2.7.14的Robot框架HttpLibrary.HTTP库 - Unable to Install Robot framework HttpLibrary.HTTP library for Python 2.7.14 机器人框架 - 获取当前日期问题 - 未找到名称为“=”的关键字 - Robot FrameWork - Get Current Date Issue - No keyword with name '=' found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM