Upload a file while running tests on LambdaTest using Selenium

How do I upload a file to my website from my local system ? It works fine in my local, but when I run in lambda test, it says file not found I had given the relative path. should I be doing anything specific to , fetch the files from my framework folder, while running them in lambda test using selenium.

public void uploadTemplate(String templateName, String path) throws InterruptedException {

searchTemplate(templateName);

clickOnFileUpload();

uploadArea.sendKeys(path);

commonMethods.clickWithRetry(waitUtil.explicitWait(uploadBtn)); }

path is relative: String template = System.getProperty(“user.dir”) + properties.getProperty(“Template”);

Template=/src/test/java/testdata/automation-template/template.gz

Hey ,

Below is the structured answer to address your query: In a cloud testing environment like LambdaTest, direct access to files from your local system isn’t supported due to security and isolation reasons. LambdaTest does not have access to your local file system.

Therefore, instead of using local file paths directly, LambdaTest requires an alternative approach for uploading files. Users should first upload the file to LambdaTest’s storage and then retrieve and utilize it in their automation tests.

For detailed guidance, please refer to our documentation: Public Doc: Upload Files Using LambdaTest Selenium Grid | LambdaTest

For more help reach out to support@lambdatest.com

Hey there,

I hope you’re doing well! Below is the structured answer to address your query:

In a cloud testing environment like LambdaTest, direct access to files from your local system isn’t supported due to security and isolation reasons. LambdaTest does not have access to your local file system. Therefore, instead of using local file paths directly, LambdaTest requires an alternative approach for uploading files. Users should first upload the file to LambdaTest’s storage and then retrieve and utilize it in their automation tests.

For detailed guidance, please refer to our documentation: Public Doc: Upload Files Using LambdaTest Selenium Grid | LambdaTest

Feel free to reach out if you need further assistance!