【发布时间】:2020-04-26 16:47:42
【问题描述】:
我正在使用 telnet 连接网络交换机,请参阅下面的脚本。在执行用户名命令时运行 80-90 次迭代后,此脚本一直显示“EOFError:telnet 连接已关闭”错误消息。我搜索了谷歌并试图找到根本原因,不幸的是,没有成功。如果您能指导我解决这个问题,我将不胜感激:
*** Settings ***
Library Telnet
*** keyword ***
Telnet Connection
Telnet.Open Connection ${IP} prompt=$
Telnet.Set Prompt (>|#|> |# |:|Password:| |) prompt_is_regexp=true
Telnet.Execute Command username
Telnet.Execute Command password
Telnet.Execute Command show something
sleep 2s
Telnet.read
Telnet.Execute Command exit
sleep 2s
Telnet.read
*** Test Cases ***
Telnet Connection
:FOR ${I} IN RANGE 0 10000
\ Telnet Connection
【问题讨论】:
标签: robotframework telnet telnetlib