Uploading Files for Website Testing via TestGrid TG Drive

You are here:
< All Topics

Overview

When automating website test cases that involve file uploads—such as attaching documents, uploading images, or submitting resumes—TG Drive offers a seamless and efficient solution. This powerful feature allows you to pre-upload all necessary files directly from your local machine to the secure TestGrid cloud environment. During the execution of your automated test cases, your scripts can then easily access and utilize these pre-staged files, ensuring reliable and consistent testing of all file upload functionalities on your website. Here’s how to upload files within TestGrid and utilize them for your web testing requirements:

Step 1: Log in with your credentials and navigate to the TG Drive.

 

Step 2: Navigate to the TG Drive page. Here, you’ll find an “Upload File” button. Click the “Upload File” button to open a file selection window, allowing you to choose the specific file from your local machine that you intend to use within your automated test cases.
  • The file will then be uploaded directly to your TG Drive, making it accessible for your testing needs. Once the upload is complete, the file will be listed within TG Drive.

 

Step 3: Navigate to the specific uploaded file in the TG Drive and then click on the “Devices” button highlighted in the below screenshot.
  • Clicking on the “Devices” button will prompt you to select the web browser within the TestGrid Device Cloud where this specific resource will be saved and made available for use.

 

Step 4: Select the particular web browser(s) in the TestGrid Device Cloud where the uploaded resource file should be saved, ensuring its availability for the subsequent execution of the automated test cases.
  • Finally, click the “Save” button to save that specific resource file to your selected browser(s).

 

Step 5: Once the resource is saved to the chosen browser, navigate to the resource listed in TG Drive and click on the highlighted icon (in the below screenshot).
  • Now, copy the file path highlighted in the below screenshot for the specific resource file that you want to use in the test case, or you can use the “copy” button itself from the TG Drive main view using the below highlighted button directly (shown in the lower right corner of the screenshot).

  • Once you click on the highlighted button (in the above screenshot), a message is automatically prompted noting that “File path copied to clipboard.” shown in the below screenshot

 

Step 6: To utilize the uploaded resource, first, navigate to the Codeless module, and then proceed to select the specific test case where the resource needs to be uploaded for your automation.
  • Now finally, add the desired steps to input that uploaded file from TG Drive to the specific input field chosen within the website that is tested in that specific test case using custom expressions as shown in the below screenshot.

 

Step 7: Finally, execute the test case within the same browser where you previously uploaded the resources. Once the test case successfully concludes, the execution logs for this step will be visible, as highlighted in the screenshot below.

 

Happy Testing!
Table of Contents