const selenium = require('selenium-webdriver'); const delay = (ms) => { return new Promise((resolve) => { setTimeout(resolve, ms); }); } let driver; const login = async ()=> { driver = await new selenium.Builder().forBrowser('chrome').build(); await driver.get('https://outcomes.generalassemb.ly/'); let selection = selenium.By.id('identify_email'); let element = driver.findElement(selection); element.sendKeys('matt.huntington@generalassemb.ly'); selection = selenium.By.id('baseForm'); element = driver.findElement(selection); element.submit(); await delay(2000); selection= selenium.By.css('input[type="text"]'); element = await driver.findElement(selection); element.sendKeys('matt.huntington@generalassemb.ly'); selection= selenium.By.css('input[type="password"]'); element = await driver.findElement(selection); element.sendKeys('Hunt!ngt0n80!'); selection = selenium.By.css('form'); element = driver.findElement(selection); element.submit(); await delay(2000); selection= selenium.By.css('a') element = await driver.findElements(selection); element[1].click(); await delay(10000); search(); } const search = async () => { let selection = selenium.By.id('program'); let element = driver.findElement(selection); let select = new selenium.Select(element); await select.selectByVisibleText('Software Engineering Immersive Remote'); selection = selenium.By.id('metro'); element = driver.findElement(selection); select = new selenium.Select(element); await select.selectByVisibleText('Online'); selection = selenium.By.id('from'); element = driver.findElement(selection); element.sendKeys('01/01/2021'); selection = selenium.By.id('filter-form'); element = driver.findElement(selection); element.submit(); } login();