如何使用 Robot Framework 在 CLI 中输入密码?

How to enter password in CLI with Robot Framework?

测试用例是本地的 CURL 命令 运行(无需打开连接),我必须在提示时输入密码。我尝试了'Write'、'Input Text'、'Input Text Into Prompt',但没有输入密码。我编写了类似这样的代码 -

${rc}  ${output}=  Run And Return Rc And Output  curl ...

这会在执行过程中要求输入密码。我怎样才能做到这一点?

也许你可以将身份验证传递给curl命令。以下是它的部分帮助:

$ curl --help
Usage: curl [options...] <url>
(...)
-u, --user USER[:PASSWORD]  Server user and password
    --tlsuser USER  TLS username
    --tlspassword STRING TLS password
    --tlsauthtype STRING  TLS authentication type (default SRP)