|
|
|
@ -79,14 +79,21 @@ const main = async () => {
|
|
|
|
try{
|
|
|
|
try{
|
|
|
|
selection = selenium.By.css('.full-time-90-days-actuals');
|
|
|
|
selection = selenium.By.css('.full-time-90-days-actuals');
|
|
|
|
let element = await driver.findElement(selection);
|
|
|
|
let element = await driver.findElement(selection);
|
|
|
|
const innerHTML = await element.getAttribute('innerHTML');
|
|
|
|
let innerHTML = await element.getAttribute('innerHTML');
|
|
|
|
const percent = parseInt(innerHTML.match(/([0-9]*%)/)[0].replace('%',''))
|
|
|
|
const percent = parseInt(innerHTML.match(/([0-9]*%)/)[0].replace('%',''))
|
|
|
|
|
|
|
|
|
|
|
|
const url = await driver.getCurrentUrl();
|
|
|
|
const url = await driver.getCurrentUrl();
|
|
|
|
const instanceID = parseInt(url.match(/[0-9]*$/i)[0]);
|
|
|
|
const instanceID = parseInt(url.match(/[0-9]*$/i)[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selection = selenium.By.css('p.course-header__detail');
|
|
|
|
|
|
|
|
element = await driver.findElement(selection);
|
|
|
|
|
|
|
|
innerHTML = await element.getAttribute('innerHTML');
|
|
|
|
|
|
|
|
const graduationDate = new Date(innerHTML.split(' - ')[1]);
|
|
|
|
|
|
|
|
|
|
|
|
if(myInstanceIDs.includes(instanceID)){
|
|
|
|
if(myInstanceIDs.includes(instanceID)){
|
|
|
|
console.log("me -->", instanceID, percent);
|
|
|
|
console.log("me -->", instanceID, graduationDate, percent);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log(instanceID, percent);
|
|
|
|
console.log(instanceID, graduationDate, percent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
//console.log(error);
|
|
|
|
//console.log(error);
|
|
|
|
|