Updated script resultfile
This commit is contained in:
4
index.js
4
index.js
@@ -68,6 +68,7 @@ app.get('/', (req, res) => {
|
|||||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">DASHBOARD</h1>
|
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">DASHBOARD</h1>
|
||||||
<div style="padding:3px;"><strong><a href='/correlationDashboard' target='_blank'>Correlation Dashboard</a></strong></div>
|
<div style="padding:3px;"><strong><a href='/correlationDashboard' target='_blank'>Correlation Dashboard</a></strong></div>
|
||||||
<div style="padding:3px;"><strong>- <a href='/dashboardMyStandards' target='_blank'>My Standards Widget</a></strong></div>
|
<div style="padding:3px;"><strong>- <a href='/dashboardMyStandards' target='_blank'>My Standards Widget</a></strong></div>
|
||||||
|
|
||||||
|
|
||||||
<!-- NEEDS UPDATE
|
<!-- NEEDS UPDATE
|
||||||
<div style="padding:3px;"><strong><a href='/ExACT_dashboardMyContent' target='_blank'>My Content Widget</a></strong></div>
|
<div style="padding:3px;"><strong><a href='/ExACT_dashboardMyContent' target='_blank'>My Content Widget</a></strong></div>
|
||||||
@@ -86,6 +87,7 @@ app.get('/', (req, res) => {
|
|||||||
<div style="padding:3px;"><strong><a href='/alignContentPage' target='_blank'>Content Page</a></strong></div>
|
<div style="padding:3px;"><strong><a href='/alignContentPage' target='_blank'>Content Page</a></strong></div>
|
||||||
<div style="padding:3px;"><strong><a href='/alignStandardsPage' target='_blank'>Standards Page</a></strong></div>
|
<div style="padding:3px;"><strong><a href='/alignStandardsPage' target='_blank'>Standards Page</a></strong></div>
|
||||||
<div style="padding:3px;"><strong>- <a href='/myStandardsSearchAlignedContent' target='_blank'>My Standards Search / Aligned Content</a></strong></div>
|
<div style="padding:3px;"><strong>- <a href='/myStandardsSearchAlignedContent' target='_blank'>My Standards Search / Aligned Content</a></strong></div>
|
||||||
|
<div style="padding:3px;"><strong>- <a href='/myStandardsSearchRelatedStandards' target='_blank'>My Standards Search / Related Standards</a></strong></div>
|
||||||
<div style="padding:3px;"><strong><a href='/alignAutoAlignPage' target='_blank'>AutoAlign Page</a></strong></div>
|
<div style="padding:3px;"><strong><a href='/alignAutoAlignPage' target='_blank'>AutoAlign Page</a></strong></div>
|
||||||
|
|
||||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">UPLOAD</h1>
|
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">UPLOAD</h1>
|
||||||
@@ -111,7 +113,7 @@ app.get('/', (req, res) => {
|
|||||||
<div style="padding:3px;"><strong><a href='/ExACT_dashboardSemanticStandardsComparison' target='_blank'>Semantic Standards Comparison Widget</a></strong></div>
|
<div style="padding:3px;"><strong><a href='/ExACT_dashboardSemanticStandardsComparison' target='_blank'>Semantic Standards Comparison Widget</a></strong></div>
|
||||||
|
|
||||||
|
|
||||||
<div style="padding:3px;"><strong><a href='/myStandardsSearchRelatedStandards' target='_blank'>My Standards Search - Related Standards</a></strong></div>
|
|
||||||
|
|
||||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">CONTENT</h1>
|
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">CONTENT</h1>
|
||||||
<div style="padding:3px;"><strong><a href='/ExACT_contentPage' target='_blank'>Content Page</a></strong></div>
|
<div style="padding:3px;"><strong><a href='/ExACT_contentPage' target='_blank'>Content Page</a></strong></div>
|
||||||
|
|||||||
BIN
results/myStandardsSearchRelatedStandards.xlsx
Normal file
BIN
results/myStandardsSearchRelatedStandards.xlsx
Normal file
Binary file not shown.
@@ -2432,14 +2432,14 @@ const myStandardsSearchRelatedStandards = (req, res) => {
|
|||||||
return readyState === 'complete';
|
return readyState === 'complete';
|
||||||
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds');
|
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds');
|
||||||
|
|
||||||
/*Wait for the dashboard container to exist in DOM
|
//Wait for the dashboard container to exist in DOM
|
||||||
await driver.wait(
|
await driver.wait(
|
||||||
until.elementLocated(By.css('.gap-idle-wrap > img')),
|
until.elementLocated(By.css('.gap-idle-wrap > img')),
|
||||||
30000,
|
30000,
|
||||||
'Dashboard image did not appear within 30 seconds'
|
'Dashboard image did not appear within 30 seconds'
|
||||||
);
|
);
|
||||||
|
|
||||||
Wait for it to be visible
|
//Wait for it to be visible
|
||||||
await driver.wait(async () => {
|
await driver.wait(async () => {
|
||||||
try {
|
try {
|
||||||
const img = await driver.findElement(By.css('.gap-idle-wrap > img'));
|
const img = await driver.findElement(By.css('.gap-idle-wrap > img'));
|
||||||
@@ -2447,7 +2447,7 @@ const myStandardsSearchRelatedStandards = (req, res) => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}, 30000, 'Dashboard image did not become visible within 30 seconds');*/
|
}, 30000, 'Dashboard image did not become visible within 30 seconds');
|
||||||
|
|
||||||
//Wait for any loading spinners to disappear
|
//Wait for any loading spinners to disappear
|
||||||
await driver.wait(async () => {
|
await driver.wait(async () => {
|
||||||
@@ -2585,7 +2585,7 @@ const myStandardsSearchRelatedStandards = (req, res) => {
|
|||||||
await driver.findElement(By.css('.show > li:nth-child(14) input')).click();
|
await driver.findElement(By.css('.show > li:nth-child(14) input')).click();
|
||||||
await driver.sleep(2000);
|
await driver.sleep(2000);
|
||||||
//Select "California Mathematics 1997" from dropdown
|
//Select "California Mathematics 1997" from dropdown
|
||||||
await driver.findElement(By.css('.show > li:nth-child(32) input')).click();
|
await driver.findElement(By.css('.show > li:nth-child(34) input')).click();
|
||||||
await driver.sleep(2000);
|
await driver.sleep(2000);
|
||||||
console.log('----->| NEXT ACTION: Selected Include Related Standards: Washington, Common Core State Standards, California Mathematics 1997');
|
console.log('----->| NEXT ACTION: Selected Include Related Standards: Washington, Common Core State Standards, California Mathematics 1997');
|
||||||
//Click away to close dropdown using executeScript to bypass interception
|
//Click away to close dropdown using executeScript to bypass interception
|
||||||
@@ -2651,6 +2651,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
|||||||
return screenshotPath;
|
return screenshotPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const resultsFile = path.join('results', 'myStandardsSearchRelatedStandards.xlsx');
|
||||||
|
|
||||||
const clearOldResults = () => {
|
const clearOldResults = () => {
|
||||||
//Remove old screenshots
|
//Remove old screenshots
|
||||||
const screenshotDir = path.join('screenshots', 'myStandardsSearchRelatedStandardsResults');
|
const screenshotDir = path.join('screenshots', 'myStandardsSearchRelatedStandardsResults');
|
||||||
@@ -2660,9 +2662,10 @@ const clearOldResults = () => {
|
|||||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||||
|
|
||||||
//Remove old Excel file
|
//Remove old Excel file
|
||||||
if (fs.existsSync('myStandardsSearchRelatedStandardsResults.xlsx')) {
|
if (fs.existsSync(resultsFile)) {
|
||||||
fs.unlinkSync('myStandardsSearchRelatedStandardsResults.xlsx');
|
fs.unlinkSync(resultsFile);
|
||||||
}
|
}
|
||||||
|
fs.mkdirSync('results', { recursive: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -2739,7 +2742,7 @@ try {
|
|||||||
|
|
||||||
//Write the updated worksheet back to the workbook and save it
|
//Write the updated worksheet back to the workbook and save it
|
||||||
workbook.Sheets['Sheet1'] = worksheet;
|
workbook.Sheets['Sheet1'] = worksheet;
|
||||||
XLSX.writeFile(workbook, 'myStandardsSearchRelatedStandardsResults.xlsx');
|
XLSX.writeFile(workbook, resultsFile);
|
||||||
} finally {
|
} finally {
|
||||||
await driver.quit();
|
await driver.quit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user