This package provides a comprehensive wrapper around the Sauce Labs REST APIs, enabling programmatic interaction with Sauce Labs services from Node.js environments. It includes support for accessing job details, managing assets, and integrating with Sauce Connect Proxy (v5). The current stable version is 9.0.2, with releases occurring as new features or maintenance fixes are required, typically in response to Sauce Labs API updates or critical bug fixes. Key differentiators include built-in TypeScript definitions, a convenient command-line interface (CLI) for common tasks, and robust support for various Sauce Labs data centers. It is designed for Node.js v16 or higher, though v18+ is recommended, making it suitable for modern JavaScript and TypeScript projects that need to automate testing workflows on the Sauce Labs platform.
npm install saucelabsVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes the Sauce Labs client, retrieves and logs the WebDriver endpoint, and then fetches details for the last five jobs associated with the authenticated user. It demonstrates basic API interaction and handling credentials.
Review the Sauce Labs API documentation for the updated Real Device API endpoints and adjust your code accordingly. Legacy RDC methods will no longer function.
Upgrade your Node.js environment to v16 or higher. For new projects, Node.js v18 or later is recommended to ensure full compatibility and access to modern JavaScript features.
Change your import statement from `const SauceLabs = require('saucelabs');` to `const SauceLabs = require('saucelabs').default;`Ensure `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are properly configured in your execution environment, or instantiate the client as `new SauceLabs({ user: 'YOUR_USERNAME', key: 'YOUR_ACCESS_KEY' });`Use `const SauceLabs = require('saucelabs').default;` instead of `const SauceLabs = require('saucelabs');`Set the `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables, or provide them explicitly: `new SauceLabs({ user: 'your_user', key: 'your_key' });`Verify the parameters passed to the API method against the `docs/interface.md` or Sauce Labs API documentation. Pay close attention to region strings and required object structures.
No dependency data recorded yet.