Hi all, in this article I will explain how to upload a file by using Robot class. I want to keep this article as simple as possible. So, I will start with the scenario.

Test Scenario

  • Open a demo website https://blueimp.github.io/jQuery-File-Upload/ 
  • Click “Add files…” button.
  • Use “uploadFileWithRobot” method to upload sw-test-academy.png image file under images folder.
  • Check that image has been uploaded as shown below.

Test Code

GitHub Link: https://github.com/swtestacademy/RobotTest