Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

selenium-grid-status

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selenium-grid-status

Fetch available browsers from a Selenium grid

Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Selenium Grid Status

A Selenium grid has no public API to get a list of browers attached and available to test with.

This module parses /grid/console and returns a JSON array of the browers that are available.

Install

npm install selenium-grid-status

Usage

var grid = require('selenium-grid-status');

grid.available({
    host: '10.0.1.25',
}, function(err, available) {
    if (err) {
        console.log('Error', err);
        process.exit(1);
    }
    console.log(JSON.stringify(available, null, 4));
    console.log('There are', available.length, 'browsers attached and ready');
});

This should print something like this:

[
    {
        "platform": "XP",
        "browserName": "firefox",
        "maxInstances": "1",
        "host": "http://10.0.1.133:5555"
    },
    {
        "platform": "XP",
        "browserName": "internet explorer",
        "maxInstances": "1",
        "host": "http://10.0.1.133:5555"
    },
    {
        "platform": "XP",
        "browserName": "firefox",
        "maxInstances": "1",
        "host": "http://10.0.1.126:5555"
    },
    {
        "platform": "XP",
        "browserName": "internet explorer",
        "maxInstances": "1",
        "host": "http://10.0.1.126:5555"
    },
    {
        "platform": "XP",
        "browserName": "firefox",
        "maxInstances": "1",
        "host": "http://10.0.1.116:5555"
    },
    {
        "platform": "XP",
        "browserName": "internet explorer",
        "maxInstances": "1",
        "host": "http://10.0.1.116:5555"
    },
    {
        "platform": "WINDOWS",
        "browserName": "firefox",
        "maxInstances": "1",
        "host": "http://10.0.1.128:5555"
    },
    {
        "platform": "WINDOWS",
        "browserName": "chrome",
        "maxInstances": "1",
        "host": "http://10.0.1.128:5555"
    },
    {
        "platform": "WINDOWS",
        "browserName": "internet explorer",
        "maxInstances": "1",
        "host": "http://10.0.1.128:5555"
    },
    {
        "platform": "MAC",
        "browserName": "chrome",
        "maxInstances": "1",
        "host": "http://10.0.1.50:5555"
    },
    {
        "platform": "MAC",
        "browserName": "firefox",
        "maxInstances": "1",
        "host": "http://10.0.1.50:5555"
    },
    {
        "platform": "MAC",
        "browserName": "chrome",
        "maxInstances": "1",
        "host": "http://10.0.1.173:5555"
    },
    {
        "platform": "MAC",
        "browserName": "firefox",
        "maxInstances": "1",
        "host": "http://10.0.1.173:5555"
    }
]
There are 13 browsers attached and ready

Keywords

selenium

FAQs

Package last updated on 02 Jan 2013

Did you know?

Socket

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.

Install

Related posts