Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Automation 如何使用Robot Framework在CLI中输入密码?_Automation_Command Line Interface_Robotframework - Fatal编程技术网

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

Automation 如何使用Robot Framework在CLI中输入密码?,automation,command-line-interface,robotframework,Automation,Command Line Interface,Robotframework,测试用例是一个在本地运行的CURL命令(不需要打开连接),我必须在提示时输入密码。我尝试了“写入”、“输入文本”、“将文本输入提示符”,但没有输入密码。我写过这样的代码- ${rc} ${output}= Run And Return Rc And Output curl ... 这要求在执行过程中输入密码。如何实现这一点?也许您可以将身份验证传递给curl命令。以下是其帮助的一部分: $ curl --help Usage: curl [options...] <url>

测试用例是一个在本地运行的CURL命令(不需要打开连接),我必须在提示时输入密码。我尝试了“写入”、“输入文本”、“将文本输入提示符”,但没有输入密码。我写过这样的代码-

${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)
$curl--帮助
用法:curl[选项…]
(...)
-u、 --用户用户[:密码]服务器用户和密码
--tlsuser用户TLS用户名
--TLS密码字符串TLS密码
--tlsauthtype字符串TLS身份验证类型(默认SRP)