Chrome Drone

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