New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chrome-drone

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-drone

Autonomously control chrome

  • 0.15.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Chrome Drone

npm version

Autonomously control the chrome browser

:rotating_light: Minimum Chrome Version :rotating_light:

You must have Chrome version 61.XX or greater installed

Installation

npm install chrome-drone

Sample Usage

const { createDrone, goTo, setValue, click, evaluate, waitForLoadingToFinish, kill } = require('chrome-drone');

async function stockPrice(symbol) {
  const drone  = await createDrone({headless: true});
  try {
    await goTo(drone, 'https://duckduckgo.com/');
    await setValue(drone, '#search_form_input_homepage', `stock quote ${symbol}`);
    await click(drone, '#search_button_homepage');
    await waitForLoadingToFinish(drone, 30000);
    const priceLastTrade = await evaluate(drone, `document.querySelector('span.stocks__quote.text--primary').innerText`);
    console.log(`Price of last trade: ${priceLastTrade}`);
  } finally {
    await kill(drone);
  }
}

stockPrice('QTWO');

API Documentation

API

Run Tests

npm test

Debugging options

  • drone-requests
  • drone-cookies
  • drone-blacklist
  • drone-loading

Keywords

FAQs

Package last updated on 02 Jan 2018

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