You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
const puppeteer = require('puppeteer');
|
|
|
|
const delay = (ms) => {
|
|
return new Promise((resolve) => {
|
|
setTimeout(resolve, ms);
|
|
});
|
|
}
|
|
|
|
(async () => {
|
|
const browser = await puppeteer.launch();
|
|
const page = await browser.newPage();
|
|
await page.goto('https://outcomes.generalassemb.ly/');
|
|
await page.type('input[type="email"]', 'matt.huntington@generalassemb.ly');
|
|
await page.click('button[type="submit"]');
|
|
|
|
console.log('entered email');
|
|
await page.waitForNavigation();
|
|
|
|
await page.type('input[type="text"]', 'matt.huntington@generalassemb.ly');
|
|
await page.type('input[type="password"]', 'Hunt!ngt0n80!');
|
|
await page.click('input[type="submit"]');
|
|
|
|
console.log('entered okta creds');
|
|
await page.waitForSelector('div[data-se="okta_verify-push"] a');
|
|
|
|
await page.click('div[data-se="okta_verify-push"] a');
|
|
|
|
console.log('selected push notification');
|
|
await page.waitForNavigation();
|
|
await page.waitForSelector('#from');
|
|
|
|
console.log('logged in');
|
|
await page.type('#from', '01/01/2015');
|
|
await page.click('input[value="Filter"]');
|
|
|
|
console.log('filtering instances');
|
|
await page.waitForNavigation();
|
|
|
|
console.log('done');
|
|
await page.screenshot({ path: 'outcomes.png' })
|
|
await browser.close();
|
|
})();
|