2024-05-14 21:34:03 发布
网友
在Robotframework中有没有其他的while循环? 我需要在桌面应用程序的状态栏中检查进度状态。为了检查,我正在使用AutoitLibrary并从progress标签读取消息。在
我的临时解决方案是使用递归关键字调用。但是,当进度比平时花费更多的时间时,测试用例会失败,并产生最大的递归调用消息。 所以,我需要一些while循环。如何在没有递归的情况下实现这一点?在
您可以使用wait until keyword succeeds关键字来执行这种行为。在
每当你说periodical,想想AdlibRegister:
periodical
AdlibRegister
AdlibRegister("ReadProgressStatus", 3000) ; to stop it: AdlibUnRegister("ReadProgressStatus") While True ; alternatively: do your "normal" Job Sleep(1000) ConsoleWrite("working..." & @CRLF) WEnd Func ReadProgressStatus() ; read Status bar etc... ConsoleWrite("checking status" & @CRLF) EndFunc ;==>ReadProgressStatus
您可以使用wait until keyword succeeds关键字来执行这种行为。在
每当你说
periodical
,想想AdlibRegister
:相关问题 更多 >
编程相关推荐