I installed the keyboard library by "pip install keyboard" in the CMD/terminal, but my VSC still does not read it? It's a robot framework automation testing project
Your problem is that you are trying to load a python library, namely keyboard as a RobotFramework library, which is not possible and that's why you get your current error.
To fix your problem you need to create your own custom library that makes use of the keyboard python library. You can also search for existing RobotFramework libraries that allows you to do what you need. I'm not sure what you want to do, but be aware that BuiltIn, OperatingSystem, Process libraries might be able to execute keyboard commands.
发布评论
评论(1)
您的问题是您正在尝试加载一个Python库,即
作为RobotFramework库,这是不可能的,这就是为什么您会遇到当前错误的原因。
键盘
要解决问题,您需要创建键盘 python库。您还可以搜索现有的 robotframework库允许您完成所需的工作。我不确定您想做什么,但是请注意,
内置
,OperatatingSystem
,Process
库可能能够执行键盘命令。Your problem is that you are trying to load a python library, namely
keyboard
as a RobotFramework library, which is not possible and that's why you get your current error.To fix your problem you need to create your own custom library that makes use of the
keyboard
python library. You can also search for existing RobotFramework libraries that allows you to do what you need. I'm not sure what you want to do, but be aware thatBuiltIn
,OperatingSystem
,Process
libraries might be able to execute keyboard commands.