You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem
It is usual repeat a test that involved a download directory from host to the target.
If a file have already been downloaded it is not necessary download it again. This is particulary annoying if the file is big or the directory contain a large number of files.
Actually Put Directory Keyword overwrite the files once and again.
It would be great if the Put Directory Keyword had a overwrite=true option.
If overwrite were false, Put Directory Keyword would not download the files if they exists.
The text was updated successfully, but these errors were encountered:
You can use the keyword Directory Should Exist in order to check that a directory is present or not on the remote machine. If you want to check if a directory is present on local machine you can use Directory Should Exist from the Operating System library.
You can do something like this if you want to check if a directory is present and if not put it to remote machine:
${status}= Run Keyword And Return Status Directory Should Exist path_to_directory
Run Keyword If ${status}==False Put Directory directory_to_put
The solution proposed by @cristii006 is pretty simple and straightforward and I don't see a significant benefit that can justify the effort to add the additional option to the keyword. Closing the issue now but if you @jlz3008 have further comments please let us know, we are happy to continue the discussion.
The problem
It is usual repeat a test that involved a download directory from host to the target.
If a file have already been downloaded it is not necessary download it again. This is particulary annoying if the file is big or the directory contain a large number of files.
Actually Put Directory Keyword overwrite the files once and again.
It would be great if the Put Directory Keyword had a overwrite=true option.
If overwrite were false, Put Directory Keyword would not download the files if they exists.
The text was updated successfully, but these errors were encountered: