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.
67 lines
1.8 KiB
67 lines
1.8 KiB
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();
|
|
}
|
|
|
|
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();
|
|
}
|
|
const main = async () => {
|
|
await login();
|
|
await delay(10000);
|
|
search();
|
|
}
|
|
main()
|