Skip to content

Instantly share code, notes, and snippets.

View lharby's full-sized avatar
💭
Actively looking for work

Luke Harby lharby

💭
Actively looking for work
View GitHub Profile
@senthilmpro
senthilmpro / script-replace-selector-content.js
Created May 3, 2018 17:10
Replace HTML Selector inner text/ content via Google Puppeteer script
async function setSelectVal(sel, val) {
await page.evaluate((data) => {
// this innerHTML can be replaced with .value (based on HTML type)
return document.querySelector(data.sel).innerHTML = data.val;
}, {sel, val});
}