I have tests written with nightwatchJs that are run with remote sauce labs selenium (aka ondemand.saucelabs.com).
In the tests flow, I need to upload a local file.
When I run tests locally, I use setValue
method. But this approach does not seem to be a good one with sauce labs.
Is there a proper way to upload local files with nightwatch and sauce labs?
Asked
Active
Viewed 399 times
2

Yuriy
- 388
- 1
- 3
- 8
2 Answers
1
I've came up with this solution: https://github.com/nightwatchjs/nightwatch/issues/890.
Unfortunately, there is a PR for this feature, but it has not been merged yet. So I forked nightwatch repo and added uploadFileToSeleniumServer
method.

MisterMe
- 149
- 10
0
Looks like solution to this was that a custom command was created for this: https://github.com/RohanImmanuel/NightwatchJS-Remote-File-Upload.
You can also see a full repo of nightwatch examples here: https://github.com/saucelabs-training/demo-js/tree/main/nightwatch

walkerlj0
- 101
- 3
-
don't comments on answer section. – Nur Nov 29 '21 at 11:59