Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

launch-browser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

launch-browser

Detect, launch and stop web browser from NodeJS

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
149
increased by16.41%
Maintainers
1
Weekly downloads
 
Created
Source

launch-browser

Detect the browser versions available on your system and launch them in an isolated profile for automated testing purposes. Support launching browsers headlessly (using Xvfb or with PhantomJS) and set the proxy configuration on the fly.

Based on browser-launcher3 but added sugar to automate browser detection, preferred browser selection and fallback to any supported browser.

Installation

npm install launch-browser

Simple Usage

var launcher = require( 'launch-browser' );

// open browser at www.google.com
// use preferred browsers (in priority order): chrome, firefox, safari
// if no proferred browsers found, open any available browser

launcher('http://www.google.com', { browser: ['chrome', 'firefox', 'safari'] }, function(e, browser){
    
    if(e) return console.log(e);
    
    browser.on('stop', function(code){
        console.log( 'Browser closed with exit code:', code );
    });
    
})

Advanced Usage

See browser-launcher3 docs.

License

MIT

FAQs

Package last updated on 10 Feb 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc