master
Matthew Huntington 2 years ago
parent 5e3e4b72af
commit 3f106fafec

@ -1,6 +1,41 @@
const selenium = require('selenium-webdriver'); const selenium = require('selenium-webdriver');
const delay = (ms) => {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}
const main = async ()=> { const main = async ()=> {
const driver = await new selenium.Builder().forBrowser('chrome').build(); const 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();
} }
main(); main();

Loading…
Cancel
Save