~~PAGEIMAGE:~~
{{htmlmetatags>metatag-robots=(noindex,nofollow)}}
====== Robot Framework ======
{{template>meta:template:pageinfo#tpl|desc=Introduce Robot Framewrok.}}
===== MindMap =====
mindmap
Robot Framework
Test Suite
Test Case
Library
===== Tips =====
==== Run Exist Keyword in Python Library ====
from robot.libraries.BuiltIn import BuiltIn
class acpu_interactive(interactive):
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
def __init__(self, host, usr, passwd, uart, timeout=1):
self.builtin = BuiltIn()
@not_keyword
def recv(self) -> str:
try:
output = super().recv()
return output
except TimeoutError:
self.builtin.run_keyword('reboot soc')
==== Robot Framework Language Server(RFLS) ====
RFLS is a VS Code extension support for Robot Framework. Here is the configuration I am currently using.
{
"files.eol": "\n",
"robot.codeLens.run.enable": true,
"robot.completions.keywords.argumentsSeparator": " | ",
"robot.completions.section_headers.form": "plural",
"robot.flowExplorerTheme": "dark",
"robot.lint.robocop.enabled": false,
"robot.loadVariablesFromArgumentsFile": "",
"robot.loadVariablesFromVariablesFile": "",
"robot.lint.variables": true,
"robot.libraries.libdoc.needsArgs": [
"remote",
"fakerlib"
],
"robot.variables": {
"LIBS": "${workspaceRoot}/lib",
"RESOURCES": "${workspaceRoot}/resource"
},
"robot.pythonpath": [
"${workspaceRoot}/lib"
],
}
* ''robot.variables'' can be used to resolve when using custom variable.
* ''robot.pythonpath'' can be used to resolve when using custom library.((ref:>https://github.com/robocorp/robotframework-lsp/blob/master/robotframework-ls/docs/faq.md))
{{template>meta:template:refnote#note}}
{{template>meta:template:refnote#ref}}
===== Further Reading =====