Skip to content

Commit 15f54ac

Browse files
Download hook while execution
1 parent 7110dec commit 15f54ac

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

docs/upload-files-using-lambdatest.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ You can upload the files on the LambdaTest cloud based Selenium Grid, using our
5555
* Click on the Lock icon to authorize your account. <img loading="lazy" src={require('../assets/images/uploads/upload-files-1.webp').default} alt="lock icon" width="1281" height="721" className="doc_img"/>]
5656
* Enter your LambdaTest username and access key, in the box that appears, to validate your credentials. Once done, click on the "Authorise button to verify the credentials, and click on Close to close the window. <img loading="lazy" src={require('../assets/images/uploads/upload-files-2.webp').default} alt="authorize button" width="1281" height="722" className="doc_img"/>
5757

58-
>
59-
To get your LambdaTest Username and Access Key, visite your [LambdaTest automation dashboard](https://automation.lambdatest.com/) and click on the "key" icon, present on the top right corner.
58+
59+
> To get your LambdaTest Username and Access Key, visite your [LambdaTest automation dashboard](https://automation.lambdatest.com/) and click on the "key" icon, present on the top right corner.
6060
<img loading="lazy" src={require('../assets/images/uploads/access-key.webp').default} alt="automation key" width="1281" height="721" className="doc_img"/>
6161
6262
* Then click on the "Try it out" button. <img loading="lazy" src={require('../assets/images/uploads/upload-files-3.webp').default} alt="choose file" width="1281" height="721" className="doc_img"/>
6363
* Once your authorization is successful and you click on the Try it out button, an option to select the file will appear on your screen. Choose the file to be uploaded using the "Choose File" button and click on Execute to upload it on the LambdaTest platform. <img loading="lazy" src={require('../assets/images/uploads/upload-files-4.webp').default} alt="200 status code" width="1281" height="721" className="doc_img"/>
6464

65-
>
66-
**Note**: You can upload multiple files to our lambda storage. A maximum of 150 files can be uploaded per organization. We have limit of 20 MB files size per API. So if you are total file sizes reach the limit, please upload your files in multiple API calls.
65+
66+
> **Note**: You can upload multiple files to our lambda storage. A maximum of 150 files can be uploaded per organization. We have limit of 20 MB files size per API. So if you are total file sizes reach the limit, please upload your files in multiple API calls.
6767
6868
Once the file is successfully uploaded, you will see a response body with 200 response code, as shown in the image below: <img loading="lazy" src={require('../assets/images/uploads/upload-files-5.webp').default} alt="upload file" width="1281" height="721" className="doc_img"/>
6969

@@ -169,7 +169,30 @@ For example, let's say you want to upload a file on a web page via test script,
169169
```
170170

171171
* * *
172-
>
172+
173+
# Download Files from LambdaTest Storage while test execution
174+
175+
During Selenium automation testing, there are scenarios where you need to retrieve files from LambdaTest's cloud storage directly to the machine running your test. LambdaTest provides a download hook that enables you to fetch files from lambda storage seamlessly during test execution.
176+
177+
178+
Before using the download hook, ensure that:
179+
- Files are already uploaded to LambdaTest storage using the [file upload API](https://www.lambdatest.com/support/api-doc/)
180+
- You have the exact file names stored in lambda storage
181+
182+
## Download Hook Implementation
183+
184+
### Basic Syntax
185+
186+
The download hook uses a simple executeScript command to fetch files from lambda storage:
187+
188+
```
189+
driver.executeScript("lambda-files-download=file_name")
190+
```
191+
192+
193+
194+
* * *
195+
173196
That's it! You can now successfully upload files and use them with Selenium Automation testing on LambdaTest's cloud server. If you face any issues, please feel free to reach out to us via our <span className="doc__lt" onClick={() => window.openLTChatWidget()}>**24/7 chat support**</span>, or you can even mail us at [[email protected]](mailto:[email protected]) <br />Happy Testing!
174197

175198
<nav aria-label="breadcrumbs">

0 commit comments

Comments
 (0)