Skip to content

Instantly share code, notes, and snippets.

@gilzonme
Created November 15, 2020 04:31
Show Gist options
  • Save gilzonme/cae373257f16f603dea4da9ba76cae3e to your computer and use it in GitHub Desktop.
Save gilzonme/cae373257f16f603dea4da9ba76cae3e to your computer and use it in GitHub Desktop.
Google Search Iron Man Simple Automation Script
const puppeteer = require('puppeteer'); // Install puppeteer from https://www.npmjs.com/package/puppeteer
(async () => {
const browser = await puppeteer.launch({headless:false, // `true` if you want to run in headless mode and hidden
defaultViewport:{
width: 1080, // adjust as required
height: 720 // adjust as required
}});
const page = await browser.newPage();
await page.goto('https://google.com');
await page.click('input[title="Search"]');
await page.keyboard.type('Iron Man');
await page.click('input[value="Google Search"]');
// Disable terminating to avoid closing of browser after steps are done 😶
})();
@kerv94
Copy link

kerv94 commented Nov 20, 2020

isssu ----> ; verk@localhost:/etc/apt$ sudo nano souces.list
bash: nano: command not found ''please help"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment