Comments (3)
I'm not sure whether I miss something but I guess instead of user it's meant to be used as
Yes exactly. This is a bug in the documentation.
Is there a reason for not picking up the provided username (options/env). Does that stem from saucelabs sub-accounts perhaps?
Yes, as you mention you could technically also fetch the details of a subaccount.
from node-saucelabs.
I think this is just not properly documented. I you create you create an instance like this:
const myAccount = new SauceLabs()
it gets username and password from the environment (SAUCE_USERNAME
and SAUCE_ACCESS_KEY
). You can also pass in an option object:
const myAccount = new SauceLabs({ user: 'foo', key: 'bar' })
from node-saucelabs.
thats true, but if neither of the ENV is set you end up with an error of something along the lines "slice of undefined bla bla bla ..." which most likely points to this section here. So proper error could be thrown instead to tell the user to either provide the options or define the ENV. Routes themselves do reject with no auth mechanism defined
Still, even when that is set, the shown sample pretty much can't run as the global user
variable is not available.
import SauceLabs from 'saucelabs';
// if imports are not supported by your Node.js version, import the package as follows:
// const SauceLabs = require('saucelabs').default;
(async () => {
const myAccount = new SauceLabs();
// get job details of last run job
const job = await user.listJobs( // <---------- where comes this user from? no window global defined
process.env.SAUCE_USERNAME,
{ limit: 1, full: true }
);
I'm not sure whether I miss something but I guess instead of user it's meant to be used as
const job = await myAccount.listJobs()
Last but not least, with listJobs
as an example, to cover my last question, you need to again pass on the username. Is there a reason for not picking up the provided username (options/env). Does that stem from saucelabs sub-accounts perhaps?
from node-saucelabs.
Related Issues (20)
- Failure on M1 Mac: unexpected signal during runtime execution HOT 5
- Response code 404 when downloading sc-4.6.5-linux32.tar.gz HOT 9
- Real devices rdc endpoints supported? HOT 3
- Deprecated Tunnels REST API version is used HOT 1
- Update build URL returned by listBuilds command HOT 3
- Sauce Connect 4.7.1 not working with newest release HOT 1
- Upgrade to 6.2.1 causes "WebDriver Error: Sauce could not start your job" HOT 12
- bin-wrapper is problematic HOT 4
- suggested various refactors HOT 4
- Proxy argument not getting passed to SC HOT 2
- query-string might need to be a dependency instead of a devDependency HOT 3
- npm audit surfaces 'got' dependency vulnerability HOT 2
- Better ESM compatibility HOT 2
- Vulnerability issue through `download` dependency HOT 7
- require() of ES Module HOT 8
- CommonJS support HOT 4
- Could not report results to Saucelabs: Error: Failed calling updateJob: Response code 404 (Not Found)
- Type mismatch for api
- Add support for Sauce Connect 5 HOT 1
- Readiness check of Sauce Connect Proxy 5 does not work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-saucelabs.