0.15.3 • Published 6 years ago
chrome-drone v0.15.3
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
Run Tests
npm test
Debugging options
- drone-requests
- drone-cookies
- drone-blacklist
- drone-loading
0.15.3
6 years ago
0.15.2
7 years ago
0.15.1
7 years ago
0.14.0
7 years ago
0.13.1
7 years ago
0.13.0
7 years ago
0.12.1
7 years ago
0.12.0
7 years ago
0.11.0
7 years ago
0.10.5
7 years ago
0.10.4
7 years ago
0.10.3
7 years ago
0.10.2
7 years ago
0.10.1
7 years ago
0.10.0
7 years ago
0.9.0
7 years ago
0.8.1
7 years ago
0.8.0
7 years ago
0.7.0
7 years ago
0.6.1
7 years ago
0.6.0
7 years ago
0.5.0
7 years ago
0.4.0
7 years ago
0.3.0
7 years ago
0.2.0
7 years ago
0.1.0
7 years ago