Cleaned up script title

This commit is contained in:
2025-04-23 10:58:31 -07:00
parent 1355056332
commit 52d812aa3f

View File

@@ -4,7 +4,7 @@ import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
const ExACT_landingPage = (req, res) => { const ExACT_landingPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script - ExACT Landing Page: Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: ExACT Landing Page(ExACT_landingPage); Initiated</h2>');
(async function example() { (async function example() {
let driver = await new Builder().forBrowser('chrome').build(); let driver = await new Builder().forBrowser('chrome').build();
let testStatus = 'Failed'; let testStatus = 'Failed';
@@ -489,19 +489,19 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const clearOldResults = () => { const clearOldResults = () => {
// Remove old screenshots // Remove old screenshots
const screenshotDir = path.join('screenshots', 'landingPage'); const screenshotDir = path.join('screenshots', 'landingPage');
if (fs.existsSync(screenshotDir)) { if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true }); fs.rmSync(screenshotDir, { recursive: true, force: true });
} }
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
// Remove old Excel file // Remove old Excel file
if (fs.existsSync('landingPageResults.xlsx')) { if (fs.existsSync('landingPageResults.xlsx')) {
fs.unlinkSync('landingPageResults.xlsx'); fs.unlinkSync('landingPageResults.xlsx');
} }
}; };
try { try {
// Initialize workbook and worksheet // Initialize workbook and worksheet
@@ -540,10 +540,10 @@ try {
const expectedEdGateCopyright = await driver.wait(until.elementLocated(By.css('.logincopyright > img')), 5000).catch(() => false); const expectedEdGateCopyright = await driver.wait(until.elementLocated(By.css('.logincopyright > img')), 5000).catch(() => false);
if (expectedEdGateCopyright && allStepsPassed) { if (expectedEdGateCopyright && allStepsPassed) {
console.log('PASSED: ExACT Landing Page - All test steps completed successfully'); console.log('PASSED: ExACT Landing Page(ExACT_landingPage); All test steps completed successfully');
testStatus = 'Passed'; testStatus = 'Passed';
} else { } else {
console.log('FAILED: ExACT Landing Page - One or more test steps did not pass'); console.log('FAILED: ExACT Landing Page(ExACT_landingPage); One or more test steps failed');
testStatus = 'Failed'; testStatus = 'Failed';
} }