Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
browserstack-api
Advanced tools
(C) Pradeep Mishra pradeep23oct@gmail.com
A JavaScript REST wrapper for BrowserStack service for node.js (0.6.x and up). Hides most of the complexity of creating, maintaining BrowserStack workers and sessions.
var BS = require('browserstack-api');
// instantiate browserstack-api with userName and key
var BrowserStack = new BS('userName', 'myKey');
// an alternate method to set username and key after creating an instance of browserstack-api
var BrowserStack = new BS;
BrowserStack.setUser('userName');
BrowserStack.setKey('myKey');
// get all supported browsers list
//{all : true, flat : true} optional parameters
BrowserStack.getBrowsers({all : true, flat : true}).then(function(reponseModel){
console.log(responseModel.toJSON());
}).fail(function(error){
});
// get status of an account
BrowserStack.getStatus().then(function(reponseModel){
console.log(responseModel.toJSON());
}).fail(function(error){
});
// get all workers created in account
BrowserStack.getAllWorkers().then(function(reponseModel){
console.log(responseModel.toJSON());
}).fail(function(error){
});
// methods available in BrowserStack instance
getEndPoint(String, nthString);
setKey(String); //'myKey'
setUser(String); // 'username'
setCredentials(Object); //{user : 'username', key : 'myKey}
setAPIVersion(Number); // 3
getBrowsers();
getStatus();
getAllWorkers();
// Worker Instance
// Worker class extend DataModel or responseModel
var worker = new BrowserStack.Worker;
worker.setOS('windows')
.setOSVersion(7)
.setBrowser('chrome')
.setBrowserVersion('20.0')
.setURL('http://google.com');
// create new worker on browserStack
worker.create().then(function(responseModel){
console.log(responseModel.toJSON());
}).fail(function(err){
});
// get status of worker
worker.getStatus().then(function(responseModel){
console.log(responseModel.toJSON());
}).fail(function(err){
});
// for taking screenshot of worker
worker.takeScreenShot().then(function(responseModel){
console.log(responseModel.toJSON());
}).fail(function(err){
});
// for destroying worker
worker.destroy().then(function(responseModel){
console.log(responseModel.toJSON());
}).fail(function(err){
});
// methods available in Worker instance
setOS(String); //'windows'
setOSVersion(String); // '7'
setBrowser(String); // 'chrome'
setDevice(String); //'ios'
setBrowserVersion(String); //'20.0'
setURL(String); //http://in.linkedin.com/in/ipradeepmishra/
setName(String); // 'pradeep'
setBuild(String);
setProject(String);
setTimeout(Number); // 30
create();
destroy();
getStatus();
takeScreenShot();
// DataModel or responseModel class
// methods available
get(String); // name
set(String, String) // name, value
has(String); // name
where(String, String) // key, value
toJSON(); // return JSON representation of model
npm install browserstack-api --save
FAQs
BrowserStack REST API wrapper
The npm package browserstack-api receives a total of 3 weekly downloads. As such, browserstack-api popularity was classified as not popular.
We found that browserstack-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.