Imitating WinScp with robotframework for uploading File
Secara Tehnis sebenarnya sangat mudah untuk meniru mimik WinScp untuk File Upload dengan Robotframework.
Tehnik yang wajib anda kuasai adalah mengerti secara tehnik fungsi:
Komando Window Batch Net use
lalu menggunakan Keyword Copy untuk upload File
Dengan menggunakan Robot Library: Operating System
Contoh Keyword simulasi Upload dengan Mimik Winscp:
*** Keywords ***
Connect Remote Path dengan Winsp
| ${map_remote_path} | Join Command Line | net use | \/persistent\:no | ${remote_path} |
| ${map_remote_status} | Run Process | ${map_remote_path} | shell=True |
| log many | ${map_remote_status.stdout} | ${map_remote_status.stderr} |
| Should Be Empty | ${map_remote_status.stderr} |
Disconnect Remote Path dengan Winsp
| ${demap_remote_path} | Join Command Line | net | use | x\: \/delete | \/yes |
| ${demap_remote_path_status} | Run Process| ${demap_remote_path}| shell=True|
| log many |${demap_remote_path}| ${demap_remote_path_status} |
| Should Be Empty | ${demap_remote_path_status.stderr} |