WebdriverIO FileUpload with BrowserStack
The repo is to test the file upload scenario. The repo dynamically uploads the file to BrowserStack from a local file path. The path can be updated in line 14 of conf/upload-media.js file. The repo uses onPrepare hook method to run the fileUpload function before the test starts. To emulate the repo, users can copy the onPrepare hook part from the conf/upload.conf.js and the actual upload function in conf/upload-media.js
- Minimum Node version 20.17
- Clone the repo
- Install dependencies
npm install
- You can setup environment variables for all sample repos
- To run tests, run
npm run test
-
You can view your test results on the BrowserStack automate dashboard
-
You can export the environment variables for the Username and Access Key of your BrowserStack account
export BROWSERSTACK_USERNAME=<browserstack-username> && export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>