How to upload file on LambdaTest cloud for Selenium Python testing?
Hi Ian!
To upload files on LambdaTest cloud for Selenium automation with Python, please follow the below steps -
- Upload the file on LambdaTest cloud servers using API.
- In the test file, you need to add the test capabilities and add the filename for the
lambda:userFiles
capability.
For example, if two files with filenames photo1.png
and photo2.png
, it has to be passed like so in the capability:
desired_caps = {
'LT:Options': {
"build": "Python Demo", # Change your build name here
"name": "Python Demo Test", # Change your test name here
"platformName": "Windows 11",
"selenium_version": "4.0.0",
"lambda:userFiles": ["photo1.png","photo2.png"]
},
"browserName": "Chrome",
"browserVersion": "98.0",
}
You can refer to the below GitHub repo that will help you upload files on LambdaTest cloud.