Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 1279 by Marcin.Koperski: New Keyword "Wait For Process To Terminate" for Operation System Library
http://code.google.com/p/robotframework/issues/detail?id=1279

I would be nice to have keyword in Operation system, which will allow to easily wait for process to wait , optionally kill it
Keyword would have following arguments
${process name}
${Timeout}
${Force Kill}=${false}

example implementation for windows
:FOR    ${i}    IN RANGE        ${iteration}                            
        ${output}       Run     tasklist /FI "IMAGENAME eq ${process name}" /FO 
CSV                           
        ${count}        Get Count       ${output}       ${process name}         
        
        Run Keyword If  ${count} < 1 Exit For Loop                           
Run Keyword If '${TRUE}'=='${Force Kill}' Run Keyword If ${count} > 0 Log Force kill process ${process name} WARN Run Keyword If '${TRUE}'=='${Force Kill}' Run Keyword If ${count} > 0 Run taskkill /F /T /IM ${process name}

Reply via email to