-
Notifications
You must be signed in to change notification settings - Fork 33
Download hook while execution #1776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TejasAmle-Lambdatest
wants to merge
1
commit into
LambdaTest:stage
Choose a base branch
from
TejasAmle-Lambdatest:stage
base: stage
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,15 +55,15 @@ You can upload the files on the LambdaTest cloud based Selenium Grid, using our | |
* 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"/>] | ||
* 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"/> | ||
|
||
> | ||
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. | ||
|
||
> 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. | ||
<img loading="lazy" src={require('../assets/images/uploads/access-key.webp').default} alt="automation key" width="1281" height="721" className="doc_img"/> | ||
|
||
* 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"/> | ||
* 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"/> | ||
|
||
> | ||
**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. | ||
|
||
> **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. | ||
|
||
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"/> | ||
|
||
|
@@ -169,7 +169,30 @@ For example, let's say you want to upload a file on a web page via test script, | |
``` | ||
|
||
* * * | ||
> | ||
|
||
# Download Files from LambdaTest Storage while test execution | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The heading should be in h2 @TejasAmle-Lambdatest |
||
|
||
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. | ||
|
||
|
||
Before using the download hook, ensure that: | ||
- Files are already uploaded to LambdaTest storage using the [file upload API](https://www.lambdatest.com/support/api-doc/) | ||
- You have the exact file names stored in lambda storage | ||
|
||
## Download Hook Implementation | ||
|
||
### Basic Syntax | ||
|
||
The download hook uses a simple executeScript command to fetch files from lambda storage: | ||
|
||
``` | ||
driver.executeScript("lambda-files-download=file_name") | ||
``` | ||
|
||
|
||
|
||
* * * | ||
|
||
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! | ||
|
||
<nav aria-label="breadcrumbs"> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the section "How To Test The Uploaded File On LambdaTest Platform" instead of writing the capabilities separately, please update this in the tabs format