import { Builder, By, Key, until } from 'selenium-webdriver'; import fs from 'fs'; import XLSX from 'xlsx'; import path from 'path'; const ExACT_dashboardSemanticStandardsComparison = (req, res) => { res.send('

ExACT Automated Test Script - Dashboard - Semantic Standards Comparison Widget(ExACT_dashboardSemanticStandardsComparison): Initiated

'); (async function example() { let driver = await new Builder().forBrowser('chrome').build(); let testStatus = 'Failed'; let workbook; let worksheet; const startTime = new Date().toISOString(); const steps = [ { description: 'Navigate to ExACT Landinghhh Page', action: async () => await driver.navigate().to('https://stage.edgate.com/exact/login.php') }, { description: 'Expand browser', action: async () => await driver.manage().window().maximize() }, //LOGIN { description: 'Login with valid credentials', action: async () => { console.log('----------------->| BEGIN |<-----------------'); console.log('----->| SEMANTIC STANDARDS COMPARISON |<-----'); await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan'); await driver.findElement(By.css('.passfield')).sendKeys('Edgate1!'); await driver.findElement(By.css('.login')).click(); //Wait until the element exists in the DOM const appliedFiltersLabel = await driver.wait( until.elementLocated(By.css('.applied-filter-sec > label')), 30000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(appliedFiltersLabel), 30000 ); //Wait for page to load completely await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'Dashboard - Correlation Dashboard Page did not fully load within 30 seconds'); console.log('Passed: Dashboard - Correlation Dashboard Page loaded successfully'); } }, //Dashboard - Page title, text, and font size { description: 'Validate - Dashboard National Standards page title text, color, and size', action: async () => { const element = await driver.findElement(By.css('.e-heading')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text = if (elementText === 'Correlation Dashboard') { console.log("Passed: Dashboard - Correlation Dashboard page title matched as expected"); } else { const message = `Expected: Dashboard - "Correlation Dashboard" page title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Dashboard - Page title text color matched as expected'); } else { const message = `Expected: Dashboard - Page title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '32px') { console.log('Passed: Dashboard - Page title text font-size matched as expected'); } else { const message = `Expected: Dashboard - Page title text font-size "32px"; Actual: "${elementSize}"`; errors.push(message); } //Throw once at the end (no additional console logs here) if (errors.length > 0) { throw new Error(errors.join('\n')); } } }, //Dashboard - Scroll to widget Semantic Standards Comparsion widget { description: 'Scroll to Semantic Standards Comparison Wiget 1', action: async () => { const location = await driver.findElement(By.css('.standards-compare h2')); await driver.executeScript("arguments[0].scrollIntoView({block: 'center'});", location); await driver.sleep(2000); } }, //Dashboard - Scroll to widget Semantic Standards Comparsion widget { description: 'Scroll to Semantic Standards Comparison Wiget 2', action: async () => { const location = await driver.findElement(By.css('#sscMapPane > p')); await driver.executeScript("arguments[0].scrollIntoView({block: 'center'});", location); await driver.sleep(2000); } }, //SEMANTIC STANDARDS COMPARISON WIDGET //Dashboard - Dashboard Semantic Standards Comparison Widget title { description: 'Validate Dashboard - Semantic Standards Comparison Widget title text, color, and size', action: async () => { const element = await driver.findElement(By.css('.standards-compare h2')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Semantic Standards Comparison') { console.log('Passed: Dashboard - Semantic Standards Comparison Widget title matched as expected'); } else { const message = `Expected: Dashboard - "Semantic Standards Comparison"; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Dashboard - Semantic Standards Comparison Widget title text color matched as expected'); } else { const message = `Expected: Dashboard - Semantic Standards Comparison Widget title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '18px') { console.log('Passed: Dashboard - Semantic Standards Comparison Widget title text font-size matched as expected'); } else { const message = `Expected: Dashboard - Semantic Standards Comparison Widget title text font-size "18px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - National Standards tab title, text, and font size (active) { description: 'Validate Dashboard - National Standards tab title text, color, and size', action: async () => { const element = await driver.findElement(By.css('#sscMap-tab')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'National Standards') { console.log('Passed: Dashboard - National Standards tab title matched as expected'); } else { const message = `Expected: Dashboard - "National Standards"; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Dashboard - National Standards tab title text color matched as expected'); } else { const message = `Expected: Dashboard - National Standards tab title text color "rgba(40, 39, 90, 1)"'; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '15px') { console.log('Passed: Dashboard - National Standards tab title text font-size matched as expected'); } else { const message = `Expected: Dashboard - National Standards tab title text font-size "15px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - Custom Comparison tab title and color (dimmed) { description: 'Validate Dashboard - Custom Comparison tab title, text color, and size', action: async () => { const element = await driver.findElement(By.css('#sscFilterLaunch-tab')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Custom Comparison') { console.log('Passed: Dashboard - Custom Comparison tab title matched as expected'); } else { const message = `Expected: Dashboard - "Custom Comparison" tab title; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(182, 186, 181, 1)') { console.log('Passed: Dashboard - Custom Comparison tab title color matched as expected'); } else { const message = `Expected: Dashboard - Custom Comparison tab title color "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '15px') { console.log('Passed: Dashboard - Custom Comparison tab title font size matched as expected'); } else { const message = `Expected: Dashboard - Custom Comparison tab title font size "15px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - State Dropdown values { description: 'Validate Dashboard - State Dropdown values', action: async () => { const elementDropdown = await driver.findElement(By.css('#compstate')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); const elementValue = await selectedOption.getAttribute('value'); const elementText = await selectedOption.getText(); const options = await elementDropdown.findElements(By.css('option')); //Track all errors const errors = []; if (elementValue === '') { console.log('Passed: Dashboard - Sate Dropdown value Please select a state, matched as expected'); } else { throw new Error(`Expected: Dashboard - State Dropdown value "Please select a state"; Actual: "${elementText}"`); } const expected = [ 'Please select a state', 'Alabama', 'Arizona', 'California', 'Florida', 'New York', 'North Carolina', 'South Carolina', 'Texas', 'Washington' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Dashboard - State Dropdown list matched as expected'); } else { throw new Error(`Expected: Dashboard - State Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - State dropdown Go button validation { description: 'Validate Dashboard - State dropdown Go button text and color', action: async () => { const element = await driver.findElement(By.css('#compbtn')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Go') { console.log('Passed: Dashboard - State dropdown Go button text matched as expected'); } else { const message = `Expected: Dashboard - "Go" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Dashboard - Go button color matched as expected'); } else { const message = `Expected: Dashboard - Go button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - National Standards widget directions { description: 'Validate Dashboard - National Standards widget directions text', action: async () => { const elementText = await driver.findElement(By.css('#sscMapPane > p')).getText(); if (elementText === 'View semantic comparisons of state standards to national sets') { console.log("Passed: Dashboard - View semantic comparisons of state standards to national sets directions text matched as expected"); } else { throw new Error(`Expected: Dashboard - "View semantic comparisons of state standards to national sets"; Actual: "${elementText}"`); } } }, //NEXT ACTION - Navigate to Custom Comparion tab { description: 'Click Custom Comparison tab link', action: async () => { await driver.findElement(By.css('#sscFilterLaunch-tab')).click(); console.log('----->| NEXT ACTION: Clicked Custom Comparison tab link'); } }, //Wait for element { description: 'Wait for element to be visible', action: async () => { //Wait until the element exists in the DOM const elementVisible = await driver.wait( until.elementLocated(By.css('#sscMap-tab')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(elementVisible), 20000 ); await driver.sleep(2000); } }, //Dashboard - National Standards tab title, text, and font size (dimmed) { description: 'Validate Dashboard - National Standards tab title text, color, and size', action: async () => { const element = await driver.findElement(By.css('#sscMap-tab')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'National Standards') { console.log('Passed: Dashboard - National Standards tab title matched as expected'); } else { const message = `Expected: Dashboard - "National Standards"; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(182, 186, 181, 1)') { console.log('Passed: Dashboard - National Standards tab title text color matched as expected'); } else { const message = `Expected: Dashboard - National Standards tab title text color "rgba(182, 186, 181, 1)"'; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '15px') { console.log('Passed: Dashboard - National Standards tab title text font-size matched as expected'); } else { const message = `Expected: Dashboard - National Standards tab title text font-size "15px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - Custom Comparison tab title and color (active) { description: 'Validate Dashboard - Custom Comparison tab title, text color, and size', action: async () => { const element = await driver.findElement(By.css('#sscFilterLaunch-tab')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Custom Comparison') { console.log('Passed: Dashboard - Custom Comparison tab title matched as expected'); } else { const message = `Expected: Dashboard - "Custom Comparison" tab title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Dashboard - Custom Comparison tab title color matched as expected'); } else { const message = `Expected: Dashboard - Custom Comparison tab title color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '15px') { console.log('Passed: Dashboard - Custom Comparison tab title font size matched as expected'); } else { const message = `Expected: Dashboard - Custom Comparison tab title font size "15px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - Custom Comparison widget info { description: 'Validate Dashboard - Custom Comparison widget information text', action: async () => { const elementText = await driver.findElement(By.css('#sscFilterLaunchPane > div > div')).getText(); if (elementText === `EdGate's advanced analysis tool provides semantic similarities, differences, and gaps across different state or organizational standards. Our advanced text analysis calculates semantic matches and provides a comprehensive comparison dataset for your team to make informed decisions faster and more effectively.`) { console.log("Passed: Dashboard - Custom Comparison info text matched as expected"); } else { throw new Error(`Expected: Dashboard - "Custom Comparison info text did not match"; Actual: "${elementText}"`); } } }, //Dashboard - Journeysmap laptop image { description: 'Verify Dashboard - Journeysmap laptop image is present', action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('img:nth-child(2)')), 5000).catch(() => false); if (!expectedIcon) { throw new Error('Expected: Dashboard - Journeysmap laptop image not found'); } console.log('Passed: Dashboard - Journeysmap laptop image is present'); } }, //Dashboard - Get Started button validation { description: 'Validate Dashboard - State dropdown Go button text, color, and icon', action: async () => { const element = await driver.findElement(By.linkText('Get Started')); const icon = await driver.findElement(By.css('.e-btn:nth-child(3) > .icon')); //Get text, color, and icon const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Get Started') { console.log('Passed: Dashboard - Get Started button text matched as expected'); } else { const message = `Expected: Dashboard - "Get Started" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Dashboard - Get Started button color matched as expected'); } else { const message = `Expected: Dashboard - Get Started button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Dashboard - Get Started button icon is present'); } else { const message = 'Expected: Dashboard - Get Started button icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //NEXT ACTION - Navigate back to National Standards tab { description: 'Click National Standards tab link', action: async () => { await driver.findElement(By.css('#sscMap-tab')).click(); console.log('----->| NEXT ACTION: Clicked National Standards tab link'); } }, //Wait for element { description: 'Wait for element to be visible', action: async () => { //Wait until the element exists in the DOM const elementVisible = await driver.wait( until.elementLocated(By.css('#sscMap-tab')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(elementVisible), 20000 ); } }, //Dashboard - National Standards tab title, text, and font size (active) { description: 'Validate Dashboard - National Standards tab title text, color, and size', action: async () => { const element = await driver.findElement(By.css('#sscMap-tab')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'National Standards') { console.log('Passed: Dashboard - National Standards tab title matched as expected'); } else { const message = `Expected: Dashboard - "National Standards"; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Dashboard - National Standards tab title text color matched as expected'); } else { const message = `Expected: Dashboard - National Standards tab title text color "rgba(40, 39, 90, 1)"'; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '15px') { console.log('Passed: Dashboard - National Standards tab title text font-size matched as expected'); } else { const message = `Expected: Dashboard - National Standards tab title text font-size "15px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Dashboard - Custom Comparison tab title and color (dimmed) { description: 'Validate Dashboard - Custom Comparison tab title, text color, and size', action: async () => { const element = await driver.findElement(By.css('#sscFilterLaunch-tab')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Custom Comparison') { console.log('Passed: Dashboard - Custom Comparison tab title matched as expected'); } else { const message = `Expected: Dashboard - "Custom Comparison" tab title; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(182, 186, 181, 1)') { console.log('Passed: Dashboard - Custom Comparison tab title color matched as expected'); } else { const message = `Expected: Dashboard - Custom Comparison tab title color "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '15px') { console.log('Passed: Dashboard - Custom Comparison tab title font size matched as expected'); } else { const message = `Expected: Dashboard - Custom Comparison tab title font size "15px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //NEXT ACTION - Click CA State { description: 'Click State of California', action: async () => { await driver.findElement(By.css('.cmm-usa-state-ca > text')).click(); console.log('----->| NEXT ACTION: Clicked California state'); } }, //Wait for page to load { description: 'Wait for page to fully load', action: async () => { //Wait until the element exists in the DOM const comparisonTitle = await driver.wait( until.elementLocated(By.css('#LA-chart-content .col-sm-12 > .text-color-accent')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(comparisonTitle), 20000 ); await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'Standards Comparison - Page did not fully load within 30 seconds'); console.log('Passed: Standards Comparison - Page loaded successfully'); await driver.sleep(5000); } }, //Standards Comparison - Title, text, and font size { description: 'Validate Standards Comparison - Page title text, color, and size', action: async () => { const element = await driver.findElement(By.css('h2')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Standards Comparison') { console.log('Passed: Standards Comparison - Page title matched as expected'); } else { const message = `Expected: "Standards Comparison" Page title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Page title text color matched as expected'); } else { const message = `Expected: Standards Comparison - Page title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '32px') { console.log('Passed: Standards Comparison - Page title text font-size matched as expected'); } else { const message = `Expected: Standards Comparison - Page title text font-size "32px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Grades dropdown label { description: 'Validate Standards Comparison - Grades dropdown label', action: async () => { const elementText = await driver.findElement(By.css('.float-right > .ml-1')).getText(); if (elementText === 'Grades') { console.log('Passed: Standards Comparison - Grades label matched as expected'); } else { throw new Error(`Expected: Standards Comparison - "Grades"; Actual: "${elementText}"`); } } }, //Standards Comparison - Grades dropdown value and title { description: 'Validate Standards Comparison - Grades dropdown value and title', action: async () => { const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div.container > form > div.btn-group > button')); //Get text, color, and size const elementText = await element.getText(); const elementTitle = await element.getAttribute('title'); //Track all errors const errors = []; //Validate text if (elementText === 'K-12') { console.log('Passed: Standards Comparison - Grades dropdown value K-12 matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown value "K-12"; Actual: "${elementText}"`; errors.push(message); } //Validate title if (elementTitle === 'K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12') { console.log('Passed: Standards Comparison - Grades dropdown title matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown title "K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"; Actual: "${elementTitle}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - State dropdown label { description: 'Validate Standards Comparison - State dropdown label', action: async () => { const elementText = await driver.findElement(By.css('.form-control-label:nth-child(4)')).getText(); if (elementText === 'State') { console.log('Passed: Standards Comparison - State dropdown label matched as expected'); } else { throw new Error(`Expected: Standards Comparison - "Sate" dropdown label; Actual: "${elementText}"`); } } }, //Standards Comparison - globe icon { description: 'Verify Standards Comparison - globe icon is present', action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-earth-americas')), 5000).catch(() => false); if (!expectedIcon) { throw new Error('Expected: Standards Comparison - globe icon not found'); } console.log('Passed: Standards Comparison - globe icon is present'); } }, //Standards Comparison - State Dropdown selected value and options { description: 'Validate Standards Comparison - State Dropdown selected value and options', action: async () => { const elementDropdown = await driver.findElement(By.css('#compstate')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); const elementText = await selectedOption.getText(); const options = await elementDropdown.findElements(By.css('option')); //Track all errors const errors = []; if (elementText === 'California') { console.log('Passed: Standards Comparison - Sate Dropdown value California, matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown value "California"; Actual: "${elementText}"`); } const expected = [ 'Please select a state', 'Alabama', 'Arizona', 'California', 'Florida', 'New York', 'North Carolina', 'South Carolina', 'Texas', 'Washington' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Standards Comparison - State Dropdown list matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - State dropdown Go button validation { description: 'Validate Standards Comparison - State dropdown Go button text and color', action: async () => { const element = await driver.findElement(By.css('#compbtn')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Go') { console.log('Passed: Standards Comparison - State dropdown Go button text matched as expected'); } else { const message = `Expected: Standards Comparison - "Go" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison - Go button color matched as expected'); } else { const message = `Expected: Standards Comparison - Go button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Language Arts tab validation (active) { description: 'Validate Standards Comparison - Language Arts tab text and color', action: async () => { const element = await driver.findElement(By.css('#LA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Language Arts') { console.log('Passed: Standards Comparison - Language Arts tab text matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -white if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standards Comparison - Language Arts tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Mathematics tab validation (dimmed) { description: 'Validate Standards Comparison - Mathematics tab text and color', action: async () => { const element = await driver.findElement(By.css('#MA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Mathematics') { console.log('Passed: Standards Comparison - Mathematics tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Mathematics" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Mathematics tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Mathematics tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Science tab validation (dimmed) { description: 'Validate Standards Comparison - Science tab text and color', action: async () => { const element = await driver.findElement(By.css('#SC-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Science') { console.log('Passed: Standards Comparison - Science tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Science" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Science tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Science tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Social Studies tab validation (dimmed) { description: 'Validate Standards Comparison - Social Studies tab text and color', action: async () => { const element = await driver.findElement(By.css('#SS-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Social Studies') { console.log('Passed: Standards Comparison - Social Studies tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Social Studies" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Social Studies tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Social Studies tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:"Standards Comparison - Language Arts tab validation ( throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Language Arts results title, text, and font size { description: 'Validate Standards Comparison - CA Language Arts results title, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content .col-sm-12 > .text-color-accent')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Comparison for California Standards - Language Arts') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Language Arts" title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Language Arts title color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '24px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Language Arts title font size "24px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Language Arts results sub-title 1, text, and font size { description: 'Validate Standards Comparison - CA Language Arts results sub-title 1, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content b:nth-child(2)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Compared to Common Core K-12 Standards') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts sub-title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Language Arts" sub-title; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts sub-title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Language Arts sub-title color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts sub-title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Language Arts sub-title font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Language Arts results sub-title 2, text, and font size { description: 'Validate Standards Comparison - CA Language Arts results sub-title 2, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content b:nth-child(4)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Grade(s):') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts sub-title 2 matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Language Arts" sub-title 2; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts sub-title 2 color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Language Arts sub-title 2 color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Language Arts sub-title 2 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Language Arts sub-title 2 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Language Arts results sub-title 3 text validation { description: 'Validate Standards Comparison - CA Language Arts results sub-title 3 text', action: async () => { try { const element = await driver.findElement(By.css('#LA-chart-content .mb-2')); //Get different versions of the text for debugging const fullText = await element.getText(); //Check for the expected text in different ways const expectedText = 'K,1,2,3,4,5,6,7,8,9,10,11,12'; const trimmedFullText = fullText.trim(); const firstLine = trimmedFullText.split('\n')[0].trim(); //Try multiple matching strategies if (firstLine.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found in first line`); } else if (trimmedFullText.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found within full text`); } else { throw new Error( `Text validation failed.\nExpected: "${expectedText}"\n` + `Full text: "${fullText}"\n` + `First line: "${firstLine}"\n` ); } } catch (error) { console.error('Detailed error during validation:', error); throw error; //Re-throw after logging } } }, //Standards Comparison - CA Language Arts results sub-title 4, text, and font size { description: 'Validate Standards Comparison - CA Language Arts results sub-title 4, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content .mt-2 > b')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Number of comparisons: 912') { console.log('Passed: Standards Comparison - Number of comparisons: 912 sub-title 4 matched as expected'); } else { const message = `Expected: Standards Comparison - "Number of comparisons: 912" sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Number of comparisons: 912 sub-title 4 color matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 912 sub-title 4 color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Number of comparisons: 912 sub-title 4 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 912 sub-title 4 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Match value and color { description: 'Validate Standards Comparison - California donut chart Match value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-0')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '96.49') { console.log('Passed: Standards Comparison - California donut chart Match value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match value "96.49"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -light green if (donutColor === 'rgba(101,209,117,1)') { console.log('Passed: Standards Comparison - California donut chart Match graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match graph color "rgba(101,209,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Similar value and color { description: 'Validate Standards Comparison - California donut chart Similar value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-1')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '3.07') { console.log('Passed: Standards Comparison - California donut chart Similar value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar value "3.07"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -yellow if (donutColor === 'rgba(249,228,109,1)') { console.log('Passed: Standards Comparison - California donut chart Similar color graph matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar graph color "rgba(249,228,109,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Partial value and color { description: 'Validate Standards Comparison - California donut chart Partial value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-2')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0.44') { console.log('Passed: Standards Comparison - California donut chart Partial value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial value "0.44"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,1)') { console.log('Passed: Standards Comparison - California donut chart Partial graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial graph color "rgba(250,168,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Low value and color { description: 'Validate Standards Comparison - California donut chart Low value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-3')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - California donut chart Low value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -pink if (donutColor === 'rgba(245,142,142,1)') { console.log('Passed: Standards Comparison - California donut chart Low graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low graph color "rgba(245,142,142,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut legend Match label { description: 'Validate Standards Comparison - California donut legend Match label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(1) > .apexcharts-legend-text')).getText(); if (elementText === 'Match') { console.log("Passed: Standards Comparison - California donut legend Match label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Match"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Similar label { description: 'Validate Standards Comparison - California donut legend Similar label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(2) > .apexcharts-legend-text')).getText(); if (elementText === 'Similar') { console.log("Passed: Standards Comparison - California donut legend Similar label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Similar"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Partial label { description: 'Validate Standards Comparison - California donut legend Partial label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(3) > .apexcharts-legend-text')).getText(); if (elementText === 'Partial') { console.log("Passed: Standards Comparison - California donut legend Partial label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Partial"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Low label { description: 'Validate Standards Comparison - California donut legend Low label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(4) > .apexcharts-legend-text')).getText(); if (elementText === 'Low') { console.log("Passed: Standards Comparison - California donut legend Low label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Low"; Actual: "${elementText}"`); } } }, //Standards Comparison - Copyright info text, color, and font size { description: 'Validate Standards Comparison - Copyright info text, color, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content small')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === '© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization.') { console.log('Passed: Standards Comparison - Copyright info text matched as expected'); } else { const message = `Expected: Standards Comparison - "© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization." sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Copyright info text color matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '10.4px') { console.log('Passed: Standards Comparison - Copyright info text font size matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text font size "10.4px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Graph Number of Records label { description: 'Validate Standards Comparison - Graph Number of Records label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-title-text')).getText(); if (elementText === 'Number of Records') { console.log("Passed: Standards Comparison - Graph Number of Records label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph label "Number of Records"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 1000 label { description: 'Validate Standards Comparison - Graph Number of Records 1000 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(1) > tspan')).getText(); if (elementText === '1000') { console.log("Passed: Standards Comparison - Graph Number of Records 1000 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "1000"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 800 label { description: 'Validate Standards Comparison - Graph Number of Records 800 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(2) > tspan')).getText(); if (elementText === '800') { console.log("Passed: Standards Comparison - Graph Number of Records 800 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "800"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 600 label { description: 'Validate Standards Comparison - Graph Number of Records 600 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(3) > tspan')).getText(); if (elementText === '600') { console.log("Passed: Standards Comparison - Graph Number of Records 600 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "600"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 400 label { description: 'Validate Standards Comparison - Graph Number of Records 400 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(4) > tspan')).getText(); if (elementText === '400') { console.log("Passed: Standards Comparison - Graph Number of Records 400 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "400"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 200 label { description: 'Validate Standards Comparison - Graph Number of Records 200 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(5) > tspan')).getText(); if (elementText === '200') { console.log("Passed: Standards Comparison - Graph Number of Records 200 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "200"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 0 label { description: 'Validate Standards Comparison - Graph Number of Records 0 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(6) > tspan')).getText(); if (elementText === '0') { console.log("Passed: Standards Comparison - Graph Number of Records 0 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "0"; Actual: "${elementText}"`); } } }, //Standards Comparison - Bar Graph Match 880 value { description: 'Validate Standards Comparison - Bar Graph Match 800 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(1)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '880') { console.log('Passed: Standards Comparison - Bar Graph Match 880 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match value "880"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -green if (donutColor === 'rgba(101,209,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Match 880 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match 880 value graph color "rgba(101,209,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Similar 28 value { description: 'Validate Standards Comparison - Bar Graph Similar 28 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(2)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '28') { console.log('Passed: Standards Comparison - Bar Graph Similar 28 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar value "28"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -gold if (donutColor === 'rgba(249,228,109,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Similar 28 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar 28 value graph color "rgba(249,228,109,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Partial 4 value { description: 'Validate Standards Comparison - Bar Graph Partial 4 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(3)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '4') { console.log('Passed: Standards Comparison - Bar Graph Partial 4 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial value "4"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Partial 4 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial 4 value graph color "rgba(250,168,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Low 0 value { description: 'Validate Standards Comparison - Bar Graph Low 0 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(4)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - Bar Graph Low 0 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -none if (donutColor === 'none') { console.log('Passed: Standards Comparison - Bar Graph Low 0 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low 0 value graph color "none"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Download Charts as PNG button validation { description: 'Validate Standards Comparison - Download Charts as PNG button text, color, and icon', action: async () => { const element = await driver.findElement(By.css('#LA-chart-download-btn-png')); const icon = await driver.findElement(By.css('#LA-chart-download-btn-png > .fa-solid')); //Get text, color, and icon const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Download Charts as PNG') { console.log('Passed: Standards Comparison - Download Charts as PNG button text matched as expected'); } else { const message = `Expected: Standards Comparison - "Download Charts as PNG" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison - Download Charts as PNG button color matched as expected'); } else { const message = `Expected: Standards Comparison - Download Charts as PNG button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison - Download Charts as PNG button icon is present'); } else { const message = 'Expected: Standards Comparison - Download Charts as PNG button icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Download Charts as PDF button validation { description: 'Validate Standards Comparison - Download Charts as PDF button text, color, and icon', action: async () => { const element = await driver.findElement(By.css('#LA-chart-download-btn-pdf')); const icon = await driver.findElement(By.css('#LA-chart-download-btn-pdf > .fa-solid')); //Get text, color, and icon const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Download Charts as PDF') { console.log('Passed: Standards Comparison - Download Charts as PDF button text matched as expected'); } else { const message = `Expected: Standards Comparison - "Download Charts as PDF" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison - Download Charts as PDF button color matched as expected'); } else { const message = `Expected: Standards Comparison - Download Charts as PDF button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison - Download Charts as PDF button icon is present'); } else { const message = 'Expected: Standards Comparison - Download Charts as PDF button icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Scroll to bottom of page { description: 'Scroll to bottom of page', action: async () => { await driver.executeScript('window.scrollTo({ top: document.body.scrollHeight, behavior: "smooth" });'); await driver.sleep(2000); } }, //Semantic Comparison Dataset - Title, text, and font size (active) { description: 'Validate Semantic Comparison Dataset - National Standards section title text, color, and size', action: async () => { const element = await driver.findElement(By.css('#LA-data-table-container h4')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text = if (elementText === 'Semantic Comparison Dataset') { console.log("Passed: Semantic Comparison Dataset - Semantic Comparison Dataset section title matched as expected"); } else { const message = `Expected: Semantic Comparison Dataset - "Semantic Comparison Dataset" section title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Semantic Comparison Dataset - Section title text color matched as expected'); } else { const message = `Expected: Semantic Comparison Dataset - Section title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '24px') { console.log('Passed: Semantic Comparison Dataset - Section title text font-size matched as expected'); } else { const message = `Expected: Semantic Comparison Dataset - Section title text font-size "24px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Semantic Comparison Dataset - Graph Match label { description: 'Validate Semantic Comparison Dataset - Filter label', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table-container .form-control-label')).getText(); if (elementText === 'Filter:') { console.log("Passed: Semantic Comparison Dataset - Filter label matched as expected"); } else { throw new Error(`Expected: Semantic Comparison Dataset - "Filter"; Actual: "${elementText}"`); } } }, //Semantic Comparison Dataset - Filter dropdown values { description: 'Validate Semantic Comparison Dataset - Dataset filter dropdown values', action: async () => { const dropdown = await driver.findElement(By.css('#LA-filter-field')); const options = await dropdown.findElements(By.css('option')); const expected = [ '', 'Similarity Score', 'Standards Set', 'Standard Code', 'Standard Text', 'Comparison Set', 'Comparison Std Code', 'Comparison Std Text', 'Subject', 'Grade' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Semantic Comparison Dataset - Filter Dropdown list matched as expected'); } else { throw new Error(`Expected: Semantic Comparison Dataset - Filter Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } } }, //Semantic Comparison Dataset - Contains dropdown values { description: 'Validate Semantic Comparison Dataset - Dataset filter dropdown values', action: async () => { const dropdown = await driver.findElement(By.css('#LA-filter-type')); const options = await dropdown.findElements(By.css('option')); const expected = [ 'contains', '=', '<', '<=', '>', '>=', 'not equal to' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Semantic Comparison Dataset - Contains Dropdown list matched as expected'); } else { throw new Error(`Expected: Semantic Comparison Dataset - Contains Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } } }, //Semantic Comparison Dataset - value to filter textbox { description: 'Validate Semantic Comparison Dataset - value to filter textbox', action: async () => { const elementText = await driver.findElement(By.css('#LA-filter-value')).getAttribute('placeholder'); if (elementText === 'value to filter') { console.log("Passed: Semantic Comparison Dataset - value to filter textbox matched as expected"); } else { throw new Error(`Expected: Semantic Comparison Dataset - "value to filter"; Actual: "${elementText}"`); } } }, //Semantic Comparison Dataset - Clear Filter button validation { description: 'Validate Semantic Comparison Dataset - Clear Filter button text, color, and icon', action: async () => { const element = await driver.findElement(By.css('#LA-filter-clear')); //Get text, color, and icon const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Clear Filter') { console.log('Passed: Semantic Comparison Dataset - Clear Filter button text matched as expected'); } else { const message = `Expected: Semantic Comparison Dataset - "Clear Filter" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Semantic Comparison Dataset - Clear Filter button color matched as expected'); } else { const message = `Expected: Semantic Comparison Dataset - Clear Filter button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset - Download Data as PDF button validation { description: 'Validate Standards Comparison Dataset - Download Data as PDF button text, color, and icon', action: async () => { const element = await driver.findElement(By.css('#LA-table-download-btn-pdf')); const icon = await driver.findElement(By.css('#LA-table-download-btn-pdf > .fa-solid')); //Get text, color, and icon const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Download Data as PDF') { console.log('Passed: Standards Comparison Dataset - Download Data as PDF button text matched as expected'); } else { const message = `Expected: Standards Comparison Dataset - "Download Data as PDF" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison Dataset - Download Data as PDF button color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset - Download Data as PDF button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset - Download Data as PDF button icon is present'); } else { const message = 'Expected: Standards Comparison Dataset - Download Data as PDF button icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset - Download Data as CSV button validation { description: 'Validate Standards Comparison Dataset - Download Data as CSV button text, color, and icon', action: async () => { const element = await driver.findElement(By.css('#LA-table-download-btn-csv')); const icon = await driver.findElement(By.css('#LA-table-download-btn-csv > .fa-solid')); //Get text, color, and icon const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Download Data as CSV') { console.log('Passed: Standards Comparison Dataset - Download Data as CSV button text matched as expected'); } else { const message = `Expected: Standards Comparison Dataset - "Download Data as CSV" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison Dataset - Download Data as CSV button color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset - Download Data as CSV button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset - Download Data as CSV button icon is present'); } else { const message = 'Expected: Standards Comparison Dataset - Download Data as CSV button icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 1 title # { description: 'Validate Standards Comparison Dataset excel table - Column 1 title # and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(1) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(1) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === '#') { console.log('Passed: Standards Comparison Dataset excel table - Column 1 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 1 title "#"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 1 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 1 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 2 title Score { description: 'Validate Standards Comparison Dataset excel table - Column 2 title Score and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(3) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(3) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Score') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 title "Score"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 2 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 2 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 title Set { description: 'Validate Standards Comparison Dataset excel table - Column 3 title Set and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(5) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(5) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Set') { console.log('Passed: Standards Comparison Dataset excel table - Column 3 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 3 title "Set"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 3 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 3 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 4 title Std Code { description: 'Validate Standards Comparison Dataset excel table - Column 4 title Std Code and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(7) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(7) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Std Code') { console.log('Passed: Standards Comparison Dataset excel table - Column 4 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 4 title "Std Code"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 4 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 4 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 5 title Std Text { description: 'Validate Standards Comparison Dataset excel table - Column 5 title Std Text and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(9) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(9) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Std Text') { console.log('Passed: Standards Comparison Dataset excel table - Column 5 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 5 title "Std Text"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 5 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 5 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 6 title Comp Set { description: 'Validate Standards Comparison Dataset excel table - Column 6 title Comp Set and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(11) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(11) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Comp Set') { console.log('Passed: Standards Comparison Dataset excel table - Column 6 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 6 title "Comp Set"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 6 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 6 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 7 title Comp Code { description: 'Validate Standards Comparison Dataset excel table - Column 7 title Comp Code and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(13) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(13) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Comp Code') { console.log('Passed: Standards Comparison Dataset excel table - Column 7 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 7 title "Comp Code"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 7 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 7 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 8 title Comp Std Text { description: 'Validate Standards Comparison Dataset excel table - Column 8 title Comp Std Text and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(15) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(15) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Comp Std Text') { console.log('Passed: Standards Comparison Dataset excel table - Column 8 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 8 title "Comp Std Text"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 8 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 8 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 9 title Subject { description: 'Validate Standards Comparison Dataset excel table - Column 9 title Comp Code and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(17) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(17) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Subject') { console.log('Passed: Standards Comparison Dataset excel table - Column 9 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 9 title "Subject"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 9 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 9 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Scroll Tabulator table to the right { description: 'Scroll Semantic Comparison Dataset table to the right', action: async () => { //Locate the scrollable table container const tableHolder = await driver.findElement(By.css('.tabulator-tableholder')); //Scroll horizontally by 300 pixels await driver.executeScript("arguments[0].scrollLeft += 300;", tableHolder); await driver.sleep(2000); } }, //Standards Comparison Dataset excel table - Column 10 title Grade { description: 'Validate Standards Comparison Dataset excel table - Column 10 title Grade and sort icon', action: async () => { const element = await driver.findElement(By.css('.tabulator-col:nth-child(19) .tabulator-col-title')); const icon = await driver.findElement(By.css('.tabulator-col:nth-child(19) .tabulator-arrow')); //Get text and icon const elementText = await element.getText(); //Track all errors const errors = []; //Validate text if (elementText === 'Grade') { console.log('Passed: Standards Comparison Dataset excel table - Column 10 title matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 10 title "Grade"; Actual: "${elementText}"`; errors.push(message); } //Validate button icon is present if (icon) { console.log('Passed: Standards Comparison Dataset excel table - Column 10 sort icon is present'); } else { const message = 'Expected: Standards Comparison Dataset excel table - Column 10 "sort" icon not found'; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Scroll Tabulator table to the right { description: 'Scroll Semantic Comparison Dataset table to the right', action: async () => { //Locate the scrollable table container const tableHolder = await driver.findElement(By.css('.tabulator-tableholder')); //Scroll horizontally by 300 pixels await driver.executeScript("arguments[0].scrollLeft = 0;", tableHolder); await driver.sleep(2000); } }, //ROW 1 //Standards Comparison Dataset excel table - Column 1 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 1 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 1 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 1 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 1 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.1') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 1 text value "CCSS.ELA-Literacy.RL.K.1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'With prompting and support, ask and answer questions about key details in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 1 text value "With prompting and support, ask and answer questions about key details in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 1 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 1 text value "RL.K.1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'With prompting and support, ask and answer questions about key details in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 1 text value "With prompting and support, ask and answer questions about key details in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 1 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 1 text value "K"; Actual: "${elementText}"`); } } }, //ROW 2 //Standards Comparison Dataset excel table - Column 1 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '2') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 2 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 2 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '99') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value "99"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 2 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.2') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 2 text value "CCSS.ELA-Literacy.RL.K.2"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'With prompting and support, retell familiar stories, including key details.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 2 text value "With prompting and support, retell familiar stories, including key details."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 2 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 2 text value "RL.K.2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'With prompting and support, retell familiar stories, including key details.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 2 text value "With prompting and support, retell familiar stories, including key details."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 2 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 2 text value "K"; Actual: "${elementText}"`); } } }, //ROW 3 //Standards Comparison Dataset excel table - Column 1 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '3') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 3 text value "3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 3 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 3 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 3 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.3') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 3 text value "CCSS.ELA-Literacy.RL.K.3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'With prompting and support, identify characters, settings, and major events in a story.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 3 text value "With prompting and support, identify characters, settings, and major events in a story."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 3 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.3.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 3 text value "RL.K.3."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'With prompting and support, identify characters, settings, and major events in a story.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 3 text value "With prompting and support, identify characters, settings, and major events in a story."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 3 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 3 text value "K"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 4 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 4 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 4 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '71') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value "71"; Actual: "${elementText}"`; errors.push(message); } //Validate color -yellow if (elementColor === 'rgba(249, 228, 109, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value color "rgba(249, 228, 109, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 4 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 4 text value "CCSS.ELA-Literacy.RL.K.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Ask and answer questions about unknown words in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 4 text value "Ask and answer questions about unknown words in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 4 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 4 text value "RL.K.1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'With prompting and support, ask and answer questions about key details in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 4 text value "With prompting and support, ask and answer questions about key details in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 4 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 4 text value "K"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '5') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 5 text value "5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 5 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 5 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '85') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value "85"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 5 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.5') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 5 text value "CCSS.ELA-Literacy.RL.K.5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Recognize common types of texts (e.g., storybooks, poems).') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 5 text value "Recognize common types of texts (e.g., storybooks, poems)."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 5 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.5.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 5 text value "RL.K.5."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Recognize common types of texts (e.g., storybooks, poems, fantasy, realistic text). CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 5 text value "Recognize common types of texts (e.g., storybooks, poems, fantasy, realistic text). CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 5 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 5 text value "K"; Actual: "${elementText}"`); } } }, //NEXT ACTION - Click Comp Set sort arrow { description: 'Click Comp Set column sort arrow', action: async () => { await driver.findElement(By.css('.tabulator-col:nth-child(13) .tabulator-arrow')).click(); console.log('----->| NEXT ACTION: Clicked Comp Set column sort arrow'); await driver.sleep(2000); } }, //ROW 1 //Standards Comparison Dataset excel table - Column 1 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '47') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 1 text value "47"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 1 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 1 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '71') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value "71"; Actual: "${elementText}"`; errors.push(message); } //Validate color -yellow if (elementColor === 'rgba(249, 228, 109, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 1 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.SL.K.2') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 1 text value "CCSS.ELA-Literacy.SL.K.2"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Confirm understanding of a text read aloud or information presented orally or through other media by asking and answering questions about key details and requesting clarification if something is not understood.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 1 text value "Confirm understanding of a text read aloud or information presented orally or through other media by asking and answering questions about key details and requesting clarification if something is not understood."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 1 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'CCSS.ELA-Literacy.CCRA.R.1') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 1 text value "CCSS.ELA-Literacy.CCRA.R.1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Read closely to determine what the text says explicitly and to make logical inferences from it; cite specific textual evidence when writing or speaking to support conclusions drawn from the text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 1 text value "Read closely to determine what the text says explicitly and to make logical inferences from it; cite specific textual evidence when writing or speaking to support conclusions drawn from the text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 1 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(1) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 1 text value "K"; Actual: "${elementText}"`); } } }, //ROW 2 //Standards Comparison Dataset excel table - Column 1 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '120') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 2 text value "120"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 2 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 2 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '62') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value "62"; Actual: "${elementText}"`; errors.push(message); } //Validate color -orange if (elementColor === 'rgba(250, 168, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 2 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.SL.1.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 2 text value "CCSS.ELA-Literacy.SL.1.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Describe people, places, things, and events with relevant details, expressing ideas and feelings clearly.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 2 text value "Describe people, places, things, and events with relevant details, expressing ideas and feelings clearly."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 2 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'CCSS.ELA-Literacy.CCRA.R.3') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 2 text value "CCSS.ELA-Literacy.CCRA.R.3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Analyze how and why individuals, events, or ideas develop and interact over the course of a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 2 text value "Analyze how and why individuals, events, or ideas develop and interact over the course of a text.."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 2 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //ROW 3 //Standards Comparison Dataset excel table - Column 1 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '448') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 3 text value "448"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 3 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 3 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '94') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value "94"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 3 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.6.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 3 text value "CCSS.ELA-Literacy.RL.6.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Determine the meaning of words and phrases as they are used in a text, including figurative and connotative meanings; analyze the impact of a specific word choice on meaning and tone.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 3 text value "Determine the meaning of words and phrases as they are used in a text, including figurative and connotative meanings; analyze the impact of a specific word choice on meaning and tone."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 3 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'CCSS.ELA-Literacy.CCRA.R.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 3 text value "CCSS.ELA-Literacy.CCRA.R.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 3 text value "Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 3 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(3) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '6') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 3 text value "6"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '458') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 4 text value "458"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 4 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 4 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '83') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value "83"; Actual: "${elementText}"`; errors.push(message); } //Validate color -yellow if (elementColor === 'rgba(249, 228, 109, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value color "rgba(249, 228, 109, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 4 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RI.6.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 4 text value "CCSS.ELA-Literacy.RI.6.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Determine the meaning of words and phrases as they are used in a text, including figurative, connotative, and technical meanings') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 4 text value "Determine the meaning of words and phrases as they are used in a text, including figurative, connotative, and technical meanings"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 4 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'CCSS.ELA-Literacy.CCRA.R.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 4 text value "CCSS.ELA-Literacy.CCRA.R.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 4 text value "Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 4 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(4) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '6') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 4 text value "6"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '528') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 5 text value "528"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 5 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 5 text and color', action: async () => { const element = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '96') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value "96"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 5 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RI.7.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 5 text value "CCSS.ELA-Literacy.RI.7.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Determine the meaning of words and phrases as they are used in a text, including figurative, connotative, and technical meanings; analyze the impact of a specific word choice on meaning and tone.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 5 text value "Determine the meaning of words and phrases as they are used in a text, including figurative, connotative, and technical meanings; analyze the impact of a specific word choice on meaning and tone."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 5 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'CCSS.ELA-Literacy.CCRA.R.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 5 text value "CCSS.ELA-Literacy.CCRA.R.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 5 text value "Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 5 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('.tabulator-row:nth-child(5) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '7') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 5 text value "K"; Actual: "${elementText}"`); } } }, //Standards Comparison - Scroll to top of page { description: 'Scroll to top of page', action: async () => { await driver.executeScript('window.scrollTo({ top: 0, behavior: "smooth" });'); await driver.sleep(2000); } }, //NEXT ACTION - Click Mathematics tab { description: 'Click Mathematics tab (active)', action: async () => { await driver.findElement(By.css('#MA-tab')).click(); console.log('----->| NEXT ACTION: Clicked Mathematics tab'); } }, //Wait for page to load { description: 'Wait for page to fully load', action: async () => { //Wait until the element exists in the DOM const comparisonTitle = await driver.wait( until.elementLocated(By.css('#MA-chart-content .col-sm-12 > .text-color-accent')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(comparisonTitle), 20000 ); await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'Standards Comparison - Page did not fully load within 30 seconds'); console.log('Passed: Standards Comparison - Page loaded successfully'); await driver.sleep(5000); } }, //Standards Comparison - Language Arts tab validation (dimmed) { description: 'Validate Standards Comparison - Language Arts tab text and color', action: async () => { const element = await driver.findElement(By.css('#LA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Language Arts') { console.log('Passed: Standards Comparison - Language Arts tab text matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Language Arts tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Mathematics tab validation (active) { description: 'Validate Standards Comparison - Mathematics tab text and color', action: async () => { const element = await driver.findElement(By.css('#MA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Mathematics') { console.log('Passed: Standards Comparison - Mathematics tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Mathematics" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -white if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standards Comparison - Mathematics tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Mathematics tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Science tab validation (dimmed) { description: 'Validate Standards Comparison - Science tab text and color', action: async () => { const element = await driver.findElement(By.css('#SC-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Science') { console.log('Passed: Standards Comparison - Science tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Science" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Science tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Science tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Social Studies tab validation (dimmed) { description: 'Validate Standards Comparison - Social Studies tab text and color', action: async () => { const element = await driver.findElement(By.css('#SS-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Social Studies') { console.log('Passed: Standards Comparison - Social Studies tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Social Studies" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Social Studies tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Social Studies tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Mathematics results title, text, and font size { description: 'Validate Standards Comparison - CA Mathematics results title, text, and font size', action: async () => { const element = await driver.findElement(By.css('#MA-chart-content .col-sm-12 > .text-color-accent')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Comparison for California Standards - Mathematics') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Mathematics" title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Mathematics title color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '24px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Mathematics title font size "24px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Mathematics results sub-title 1, text, and font size { description: 'Validate Standards Comparison - CA Mathematics results sub-title 1, text, and font size', action: async () => { const element = await driver.findElement(By.css('#MA-chart-content b:nth-child(2)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Compared to Common Core K-12 Standards') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics sub-title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Mathematics" sub-title; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics sub-title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Mathematics sub-title color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics sub-title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Mathematics sub-title font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Mathematics results sub-title 2, text, and font size { description: 'Validate Standards Comparison - CA Mathematics results sub-title 2, text, and font size', action: async () => { const element = await driver.findElement(By.css('#MA-chart-content b:nth-child(4)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Grade(s):') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics sub-title 2 matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Mathematics" sub-title 2; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics sub-title 2 color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Mathematics sub-title 2 color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Mathematics sub-title 2 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Mathematics sub-title 2 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Mathematics results sub-title 3 text validation { description: 'Validate Standards Comparison - CA Mathematics results sub-title 3 text', action: async () => { try { const element = await driver.findElement(By.css('#MA-chart-content .mb-2')); //Get different versions of the text for debugging const fullText = await element.getText(); //Check for the expected text in different ways const expectedText = 'K,1,2,3,4,5,6,7,8,9,10,11,12'; const trimmedFullText = fullText.trim(); const firstLine = trimmedFullText.split('\n')[0].trim(); //Try multiple matching strategies if (firstLine.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found in first line`); } else if (trimmedFullText.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found within full text`); } else { throw new Error( `Text validation failed.\nExpected: "${expectedText}"\n` + `Full text: "${fullText}"\n` + `First line: "${firstLine}"\n` ); } } catch (error) { console.error('Detailed error during validation:', error); throw error; //Re-throw after logging } } }, //Standards Comparison - CA Mathematics results sub-title 4, text, and font size { description: 'Validate Standards Comparison - CA Mathematics results sub-title 4, text, and font size', action: async () => { const element = await driver.findElement(By.css('#MA-chart-content .mt-2 > b')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Number of comparisons: 1,107') { console.log('Passed: Standards Comparison - Number of comparisons: 1,107 sub-title 4 matched as expected'); } else { const message = `Expected: Standards Comparison - "Number of comparisons: 1,107" sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Number of comparisons: 1,107 sub-title 4 color matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 1,107 sub-title 4 color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Number of comparisons: 1,107 sub-title 4 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 1,107 sub-title 4 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Match value and color { description: 'Validate Standards Comparison - California donut chart Match value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-0')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '98.92') { console.log('Passed: Standards Comparison - California donut chart Match value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match value "98.92"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -light green if (donutColor === 'rgba(101,209,117,1)') { console.log('Passed: Standards Comparison - California donut chart Match graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match graph color "rgba(101,209,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Similar value and color { description: 'Validate Standards Comparison - California donut chart Similar value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-1')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0.72') { console.log('Passed: Standards Comparison - California donut chart Similar value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar value "0.72"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -yellow if (donutColor === 'rgba(249,228,109,1)') { console.log('Passed: Standards Comparison - California donut chart Similar graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar graph color "rgba(249,228,109,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Partial value and color { description: 'Validate Standards Comparison - California donut chart Partial value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-2')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0.36') { console.log('Passed: Standards Comparison - California donut chart Partial value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial value "0.36"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,1)') { console.log('Passed: Standards Comparison - California donut chart Partial graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial graph color "rgba(250,168,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Low value and color { description: 'Validate Standards Comparison - California donut chart Low value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-3')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - California donut chart Low value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -pink if (donutColor === 'rgba(245,142,142,1)') { console.log('Passed: Standards Comparison - California donut chart Low graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low graph color "rgba(245,142,142,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut legend Match label { description: 'Validate Standards Comparison - California donut legend Match label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(1) > .apexcharts-legend-text')).getText(); if (elementText === 'Match') { console.log("Passed: Standards Comparison - California donut legend Match label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Match"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Similar label { description: 'Validate Standards Comparison - California donut legend Similar label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(2) > .apexcharts-legend-text')).getText(); if (elementText === 'Similar') { console.log("Passed: Standards Comparison - California donut legend Similar label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Similar"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Partial label { description: 'Validate Standards Comparison - California donut legend Partial label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(3) > .apexcharts-legend-text')).getText(); if (elementText === 'Partial') { console.log("Passed: Standards Comparison - California donut legend Partial label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Partial"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Low label { description: 'Validate Standards Comparison - California donut legend Low label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(4) > .apexcharts-legend-text')).getText(); if (elementText === 'Low') { console.log("Passed: Standards Comparison - California donut legend Low label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Low"; Actual: "${elementText}"`); } } }, //Standards Comparison - Copyright info text, color, and font size { description: 'Validate Standards Comparison - Copyright info text, color, and font size', action: async () => { const element = await driver.findElement(By.css('#MA-chart-content small')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === '© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization.') { console.log('Passed: Standards Comparison - Copyright info text matched as expected'); } else { const message = `Expected: Standards Comparison - "© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization." sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Copyright info text color matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '10.4px') { console.log('Passed: Standards Comparison - Copyright info text font size matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text font size "10.4px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Graph Number of Records label { description: 'Validate Standards Comparison - Graph Number of Records label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-title-text')).getText(); if (elementText === 'Number of Records') { console.log("Passed: Standards Comparison - Graph Number of Records label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph label "Number of Records"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 1200 label { description: 'Validate Standards Comparison - Graph Number of Records 1200 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(1) > tspan')).getText(); if (elementText === '1200') { console.log("Passed: Standards Comparison - Graph Number of Records 1200 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "1200"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 1000 label { description: 'Validate Standards Comparison - Graph Number of Records 1000 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(2) > tspan')).getText(); if (elementText === '1000') { console.log("Passed: Standards Comparison - Graph Number of Records 1000 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "1000"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 800 label { description: 'Validate Standards Comparison - Graph Number of Records 800 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(3) > tspan')).getText(); if (elementText === '800') { console.log("Passed: Standards Comparison - Graph Number of Records 800 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "800"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 600 label { description: 'Validate Standards Comparison - Graph Number of Records 600 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(4) > tspan')).getText(); if (elementText === '600') { console.log("Passed: Standards Comparison - Graph Number of Records 600 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "600"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 400 label { description: 'Validate Standards Comparison - Graph Number of Records 400 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(5) > tspan')).getText(); if (elementText === '400') { console.log("Passed: Standards Comparison - Graph Number of Records 400 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "400"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 200 label { description: 'Validate Standards Comparison - Graph Number of Records 200 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(6) > tspan')).getText(); if (elementText === '200') { console.log("Passed: Standards Comparison - Graph Number of Records 200 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "200"; Actual: "${elementText}"`); } } }, //Standards Comparison - Bar Graph Match 1095 value { description: 'Validate Standards Comparison - Bar Graph Match 1095 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(1)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '1095') { console.log('Passed: Standards Comparison - Bar Graph Match 1095 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match value "1095"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -green if (donutColor === 'rgba(101,209,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Match 1095 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match 1095 value graph color "rgba(101,209,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Similar 8 value { description: 'Validate Standards Comparison - Bar Graph Similar 8 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(2)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '8') { console.log('Passed: Standards Comparison - Bar Graph Similar 8 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar value "8"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -gold if (donutColor === 'rgba(249,228,109,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Similar 8 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar 8 value graph color "rgba(249,228,109,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Partial 4 value { description: 'Validate Standards Comparison - Bar Graph Partial 4 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(3)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '4') { console.log('Passed: Standards Comparison - Bar Graph Partial 4 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial value "4"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Partial 4 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial 4 value graph color "rgba(250,168,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Low 0 value { description: 'Validate Standards Comparison - Bar Graph Low 0 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(4)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - Bar Graph Low 0 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -none if (donutColor === 'none') { console.log('Passed: Standards Comparison - Bar Graph Low 0 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low 0 value graph color "none"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Scroll to bottom of page { description: 'Scroll to bottom of page', action: async () => { await driver.executeScript('window.scrollTo({ top: document.body.scrollHeight, behavior: "smooth" });'); await driver.sleep(2000); } }, //NEXT ACTION - Set Semantic Comparison Dataset filter { description: 'Validate Standards Comparison - Apply filter for Comparison Std Code equals MP.4.', action: async () => { //Select "Comparison Std Code" from dropdown const filterField = await driver.findElement(By.css('#MA-filter-field')); await filterField.click(); await filterField.findElement(By.css('option:nth-child(7)')).click(); await driver.sleep(2000); //Select "equals" filter type const filterType = await driver.findElement(By.css('#MA-filter-type')); await filterType.click(); await filterType.findElement(By.css('option:nth-child(2)')).click(); await driver.sleep(2000); //Enter value const filterValue = await driver.findElement(By.css('#MA-filter-value')); await filterValue.sendKeys('MP.4.'); console.log('----->| NEXT ACTION: Set filter parameters: Comparison Std Code, equals, and searched for MP.4.'); await driver.sleep(2000); }, }, //ROW 1 //Standards Comparison Dataset excel table - Column 1 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 1 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 1 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 1 text and color', action: async () => { const element = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '99') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value "99"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 1 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.Math.Practice.MP4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 1 text value "CCSS.Math.Practice.MP4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 1 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 1 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'MP.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 1 text value "RL.K.1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 1 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Mathematics') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 1 text value "Mathematics"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 1 text value "K"; Actual: "${elementText}"`); } } }, //ROW 2 //Standards Comparison Dataset excel table - Column 1 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '36') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 2 text value "36"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 2 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 2 text and color', action: async () => { const element = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.Math.Practice.MP4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 2 text value "CCSS.Math.Practice.MP4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 2 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 2 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'MP.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 2 text value "MP.4."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 2 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Mathematics') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 2 text value "Mathematics"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //ROW 3 //Standards Comparison Dataset excel table - Column 1 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '67') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 3 text value "67"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 3 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 3 text and color', action: async () => { const element = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 3 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.Math.Practice.MP4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 3 text value "CCSS.Math.Practice.MP4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 3 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 3 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'MP.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 3 text value "MP.4."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 3 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Mathematics') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 3 text value "Mathematics"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '2') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 3 text value "2"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '102') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 4 text value "102"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 4 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 4 text and color', action: async () => { const element = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 4 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.Math.Practice.MP4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 4 text value "CCSS.Math.Practice.MP4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 4 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 4 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'MP.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 4 text value "MP.4."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 4 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Mathematics') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 4 text value "Mathematics"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '3') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 4 text value "3"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '143') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 5 text value "143"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 5 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 5 text and color', action: async () => { const element = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 5 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.Math.Practice.MP4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 5 text value "CCSS.Math.Practice.MP4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 5 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 5 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'MP.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 5 text value "MP.4."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Model with mathematics.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 5 text value "Model with mathematics."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Mathematics') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 5 text value "Mathematics"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#MA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 5 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison - Scroll to top of page { description: 'Scroll to top of page', action: async () => { await driver.executeScript('window.scrollTo({ top: 0, behavior: "smooth" });'); await driver.sleep(2000); } }, //NEXT ACTION - Click Science tab { description: 'Click Science tab (active)', action: async () => { await driver.findElement(By.css('#SC-tab')).click(); console.log('----->| NEXT ACTION: Clicked Science tab'); } }, //Wait for page to load { description: 'Wait for page to fully load', action: async () => { //Wait until the element exists in the DOM const comparisonTitle = await driver.wait( until.elementLocated(By.css('#SC-chart-content .col-sm-12 > .text-color-accent')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(comparisonTitle), 20000 ); await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'Standards Comparison - Page did not fully load within 30 seconds'); console.log('Passed: Standards Comparison - Page loaded successfully'); await driver.sleep(5000); } }, //Standards Comparison - Language Arts tab validation (dimmed) { description: 'Validate Standards Comparison - Language Arts tab text and color', action: async () => { const element = await driver.findElement(By.css('#LA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Language Arts') { console.log('Passed: Standards Comparison - Language Arts tab text matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Language Arts tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Mathematics tab validation (dimmed) { description: 'Validate Standards Comparison - Mathematics tab text and color', action: async () => { const element = await driver.findElement(By.css('#MA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Mathematics') { console.log('Passed: Standards Comparison - Mathematics tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Mathematics" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Mathematics tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Mathematics tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Science tab validation (active) { description: 'Validate Standards Comparison - Science tab text and color', action: async () => { const element = await driver.findElement(By.css('#SC-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Science') { console.log('Passed: Standards Comparison - Science tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Science" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -white if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standards Comparison - Science tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Science tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Social Studies tab validation (dimmed) { description: 'Validate Standards Comparison - Social Studies tab text and color', action: async () => { const element = await driver.findElement(By.css('#SS-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Social Studies') { console.log('Passed: Standards Comparison - Social Studies tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Social Studies" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Social Studies tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Social Studies tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Science results title, text, and font size { description: 'Validate Standards Comparison - CA Science results title, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SC-chart-content .col-sm-12 > .text-color-accent')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Comparison for California Standards - Science') { console.log('Passed: Standards Comparison - Comparison for California Standards - Science title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Science" title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Science title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Science title color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '24px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Science title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Science title font size "24px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Science results sub-title 1, text, and font size { description: 'Validate Standards Comparison - CA Science results sub-title 1, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SC-chart-content b:nth-child(2)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Compared to Next Generation Science Standards') { console.log('Passed: Standards Comparison - Compared to Next Generation Science Standards sub-title matched as expected'); } else { const message = `Expected: Standards Comparison - "Compared to Next Generation Science Standards" sub-title; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Compared to Next Generation Science Standards sub-title color matched as expected'); } else { const message = `Expected: Standards Comparison - Compared to Next Generation Science Standards sub-title color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Compared to Next Generation Science Standards sub-title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Compared to Next Generation Science Standards sub-title font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Science results sub-title 2, text, and font size { description: 'Validate Standards Comparison - CA Science results sub-title 2, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SC-chart-content b:nth-child(4)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Grade(s):') { console.log('Passed: Standards Comparison - Comparison for California Standards - Science sub-title 2 matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Science" sub-title 2; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Science sub-title 2 color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Science sub-title 2 color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Science sub-title 2 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Science sub-title 2 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Science results sub-title 3 text validation { description: 'Validate Standards Comparison - CA Science results sub-title 3 text', action: async () => { try { const element = await driver.findElement(By.css('#SC-chart-content .mb-2')); //Get different versions of the text for debugging const fullText = await element.getText(); //Check for the expected text in different ways const expectedText = 'K,1,2,3,4,5,6,7,8,9,10,11,12'; const trimmedFullText = fullText.trim(); const firstLine = trimmedFullText.split('\n')[0].trim(); //Try multiple matching strategies if (firstLine.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found in first line`); } else if (trimmedFullText.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found within full text`); } else { throw new Error( `Text validation failed.\nExpected: "${expectedText}"\n` + `Full text: "${fullText}"\n` + `First line: "${firstLine}"\n` ); } } catch (error) { console.error('Detailed error during validation:', error); throw error; //Re-throw after logging } } }, //Standards Comparison - CA Science results sub-title 4, text, and font size { description: 'Validate Standards Comparison - CA Science results sub-title 4, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SC-chart-content .mt-2 > b')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Number of comparisons: 551') { console.log('Passed: Standards Comparison - Number of comparisons: 551 sub-title 4 matched as expected'); } else { const message = `Expected: Standards Comparison - "Number of comparisons: 551" sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Number of comparisons: 551 sub-title 4 color matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 551 sub-title 4 color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Number of comparisons: 551 sub-title 4 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 551 sub-title 4 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Match value and color { description: 'Validate Standards Comparison - California donut chart Match value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-0')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '80.04') { console.log('Passed: Standards Comparison - California donut chart Match value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match value "80.04"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -light green if (donutColor === 'rgba(101,209,117,1)') { console.log('Passed: Standards Comparison - California donut chart Match graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match graph color "rgba(101,209,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Similar value and color { description: 'Validate Standards Comparison - California donut chart Similar value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-1')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '3.99') { console.log('Passed: Standards Comparison - California donut chart Similar value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar value "3.99"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -yellow if (donutColor === 'rgba(249,228,109,1)') { console.log('Passed: Standards Comparison - California donut chart Similar graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar graph color "rgba(249,228,109,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Partial value and color { description: 'Validate Standards Comparison - California donut chart Partial value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-2')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '14.16') { console.log('Passed: Standards Comparison - California donut chart Partial value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial value "14.16"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,1)') { console.log('Passed: Standards Comparison - California donut chart Partial graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial graph color "rgba(250,168,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Low value and color { description: 'Validate Standards Comparison - California donut chart Low value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-3')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '1.81') { console.log('Passed: Standards Comparison - California donut chart Low value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low value "1.81"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -pink if (donutColor === 'rgba(245,142,142,1)') { console.log('Passed: Standards Comparison - California donut chart Low graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low graph color "rgba(245,142,142,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut legend Match label { description: 'Validate Standards Comparison - California donut legend Match label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(1) > .apexcharts-legend-text')).getText(); if (elementText === 'Match') { console.log("Passed: Standards Comparison - California donut legend Match label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Match"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Similar label { description: 'Validate Standards Comparison - California donut legend Similar label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(2) > .apexcharts-legend-text')).getText(); if (elementText === 'Similar') { console.log("Passed: Standards Comparison - California donut legend Similar label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Similar"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Partial label { description: 'Validate Standards Comparison - California donut legend Partial label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(3) > .apexcharts-legend-text')).getText(); if (elementText === 'Partial') { console.log("Passed: Standards Comparison - California donut legend Partial label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Partial"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Low label { description: 'Validate Standards Comparison - California donut legend Low label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(4) > .apexcharts-legend-text')).getText(); if (elementText === 'Low') { console.log("Passed: Standards Comparison - California donut legend Low label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Low"; Actual: "${elementText}"`); } } }, //Standards Comparison - Copyright info text, color, and font size { description: 'Validate Standards Comparison - Copyright info text, color, and font size', action: async () => { const element = await driver.findElement(By.css('#SC-chart-content small')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === '© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization.') { console.log('Passed: Standards Comparison - Copyright info text matched as expected'); } else { const message = `Expected: Standards Comparison - "© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization." sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Copyright info text color matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '10.4px') { console.log('Passed: Standards Comparison - Copyright info text font size matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text font size "10.4px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Graph Number of Records label { description: 'Validate Standards Comparison - Graph Number of Records label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-title-text')).getText(); if (elementText === 'Number of Records') { console.log("Passed: Standards Comparison - Graph Number of Records label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph label "Number of Records"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 500 label { description: 'Validate Standards Comparison - Graph Number of Records 500 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(1) > tspan')).getText(); if (elementText === '500') { console.log("Passed: Standards Comparison - Graph Number of Records 500 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "500"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 400 label { description: 'Validate Standards Comparison - Graph Number of Records 400 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(2) > tspan')).getText(); if (elementText === '400') { console.log("Passed: Standards Comparison - Graph Number of Records 400 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "400"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 300 label { description: 'Validate Standards Comparison - Graph Number of Records 300 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(3) > tspan')).getText(); if (elementText === '300') { console.log("Passed: Standards Comparison - Graph Number of Records 300 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "300"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 200 label { description: 'Validate Standards Comparison - Graph Number of Records 200 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(4) > tspan')).getText(); if (elementText === '200') { console.log("Passed: Standards Comparison - Graph Number of Records 200 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "200"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 100 label { description: 'Validate Standards Comparison - Graph Number of Records 100 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(5) > tspan')).getText(); if (elementText === '100') { console.log("Passed: Standards Comparison - Graph Number of Records 100 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "100"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 0 label { description: 'Validate Standards Comparison - Graph Number of Records 0 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(6) > tspan')).getText(); if (elementText === '0') { console.log("Passed: Standards Comparison - Graph Number of Records 0 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "0"; Actual: "${elementText}"`); } } }, //Standards Comparison - Bar Graph Match 441 value { description: 'Validate Standards Comparison - Bar Graph Match 441 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(1)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '441') { console.log('Passed: Standards Comparison - Bar Graph Match 441 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match value "441"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -green if (donutColor === 'rgba(101,209,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Match 441 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match 441 value graph color "rgba(101,209,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Similar 22 value { description: 'Validate Standards Comparison - Bar Graph Similar 22 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(2)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '22') { console.log('Passed: Standards Comparison - Bar Graph Similar 22 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar value "22"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -gold if (donutColor === 'rgba(249,228,109,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Similar 22 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar 22 value graph color "rgba(249,228,109,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Partial 78 value { description: 'Validate Standards Comparison - Bar Graph Partial 78 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(3)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '78') { console.log('Passed: Standards Comparison - Bar Graph Partial 78 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial value "78"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Partial 78 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial 78 value graph color "rgba(250,168,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Low 10 value { description: 'Validate Standards Comparison - Bar Graph Low 10 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(4)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '10') { console.log('Passed: Standards Comparison - Bar Graph Low 10 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low value "10"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(245,142,142,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Low 10 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low 10 value graph color "rgba(245,142,142,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Scroll to bottom of page { description: 'Scroll to bottom of page', action: async () => { await driver.executeScript('window.scrollTo({ top: document.body.scrollHeight, behavior: "smooth" });'); await driver.sleep(2000); } }, //ROW 1 //Standards Comparison Dataset excel table - Column 1 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 1 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 1 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 1 text and color', action: async () => { const element = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '99') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value "99"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NRCDSC') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 1 text value "NRCDSC"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'K-PS2-1') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 1 text value "K-PS2-1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Plan and conduct an investigation to compare the effects of different strengths or different directions of pushes and pulls on the motion of an object.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 1 text value "Plan and conduct an investigation to compare the effects of different strengths or different directions of pushes and pulls on the motion of an object."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 1 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-PS2-1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 1 text value "K-PS2-1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Plan and conduct an investigation to compare the effects of different strengths or different directions of pushes and pulls on the motion of an object.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 1 text value "Plan and conduct an investigation to compare the effects of different strengths or different directions of pushes and pulls on the motion of an object."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Science') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 1 text value "Science"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 1 text value "K"; Actual: "${elementText}"`); } } }, //ROW 2 //Standards Comparison Dataset excel table - Column 1 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '2') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 2 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 2 text and color', action: async () => { const element = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NRCDSC') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 2 text value "NRCDSC"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'K-PS2-2') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 2 text value "K-PS2-2"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Analyze data to determine if a design solution works as intended to change the speed or direction of an object with a push or a pull.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 2 text value "Analyze data to determine if a design solution works as intended to change the speed or direction of an object with a push or a pull."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 2 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-PS2-2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 2 text value "K-PS2-2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Analyze data to determine if a design solution works as intended to change the speed or direction of an object with a push or a pull.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 2 text value "Analyze data to determine if a design solution works as intended to change the speed or direction of an object with a push or a pull."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Science') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 2 text value "Science"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 2 text value "K"; Actual: "${elementText}"`); } } }, //ROW 3 //Standards Comparison Dataset excel table - Column 1 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '3') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 3 text value "3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 3 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 3 text and color', action: async () => { const element = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NRCDSC') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 3 text value "NRCDSC"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'K-PS3-1') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 3 text value "K-PS3-1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Make observations to determine the effect of sunlight on Earth’s surface.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 3 text value "Make observations to determine the effect of sunlight on Earth’s surface."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 3 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-PS3-1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 3 text value "K-PS3-1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Make observations to determine the effect of sunlight on Earth’s surface.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 3 text value "Make observations to determine the effect of sunlight on Earth’s surface."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Science') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 3 text value "Science"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 3 text value "K"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 4 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 4 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 4 text and color', action: async () => { const element = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '99') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value "99"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NRCDSC') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 4 text value "NRCDSC"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'K-PS3-2') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 4 text value "K-PS3-2"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Use tools and materials to design and build a structure that will reduce the warming effect of sunlight on an area.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 4 text value "Use tools and materials to design and build a structure that will reduce the warming effect of sunlight on an area."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 4 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-PS3-2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 4 text value "K-PS3-2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Use tools and materials to design and build a structure that will reduce the warming effect of sunlight on an area.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 4 text value "Use tools and materials to design and build a structure that will reduce the warming effect of sunlight on an area."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Science') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 4 text value "Science"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 4 text value "K"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '5') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 5 text value "5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 5 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 5 text and color', action: async () => { const element = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '99') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value "99"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NRCDSC') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 5 text value "NRCDSC"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'K-LS1-1') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 5 text value "K-LS1-1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Use observations to describe patterns of what plants and animals (including humans) need to survive.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 5 text value "Use observations to describe patterns of what plants and animals (including humans) need to survive."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 5 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-LS1-1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 5 text value "K-LS1-1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Use observations to describe patterns of what plants and animals (including humans) need to survive.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 5 text value "Use observations to describe patterns of what plants and animals (including humans) need to survive."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Science') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 5 text value "Science"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SC-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 5 text value "K"; Actual: "${elementText}"`); } } }, //Standards Comparison - Scroll to top of page { description: 'Scroll to top of page', action: async () => { await driver.executeScript('window.scrollTo({ top: 0, behavior: "smooth" });'); await driver.sleep(2000); } }, //NEXT ACTION - Click Social Studies tab { description: 'Click Social Studies tab (active)', action: async () => { await driver.findElement(By.css('#SS-tab')).click(); console.log('----->| NEXT ACTION: Clicked Social Studies tab'); } }, //Wait for page to load { description: 'Wait for page to fully load', action: async () => { //Wait until the element exists in the DOM const comparisonTitle = await driver.wait( until.elementLocated(By.css('#SS-chart-content .col-sm-12 > .text-color-accent')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(comparisonTitle), 20000 ); await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'Standards Comparison - Page did not fully load within 30 seconds'); console.log('Passed: Standards Comparison - Page loaded successfully'); await driver.sleep(5000); } }, //Standards Comparison - Language Arts tab validation (dimmed) { description: 'Validate Standards Comparison - Language Arts tab text and color', action: async () => { const element = await driver.findElement(By.css('#LA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Language Arts') { console.log('Passed: Standards Comparison - Language Arts tab text matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Language Arts tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Mathematics tab validation (dimmed) { description: 'Validate Standards Comparison - Mathematics tab text and color', action: async () => { const element = await driver.findElement(By.css('#MA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Mathematics') { console.log('Passed: Standards Comparison - Mathematics tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Mathematics" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Mathematics tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Mathematics tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Science tab validation (dimmed) { description: 'Validate Standards Comparison - Science tab text and color', action: async () => { const element = await driver.findElement(By.css('#SC-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Science') { console.log('Passed: Standards Comparison - Science tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Science" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Science tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Science tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Social Studies tab validation (active) { description: 'Validate Standards Comparison - Social Studies tab text and color', action: async () => { const element = await driver.findElement(By.css('#SS-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Social Studies') { console.log('Passed: Standards Comparison - Social Studies tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Social Studies" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -white if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standards Comparison - Social Studies tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Social Studies tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Social Studies results title, text, and font size { description: 'Validate Standards Comparison - CA Social Studies results title, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SS-chart-content .col-sm-12 > .text-color-accent')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Comparison for California Standards - Social Studies') { console.log('Passed: Standards Comparison - Comparison for California Standards - Social Studies title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Social Studies" title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Social Studies title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Social Studies title color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '24px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Social Studies title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Social Studies title font size "24px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Social Studies results sub-title 1, text, and font size { description: 'Validate Standards Comparison - CA Social Studies results sub-title 1, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SS-chart-content b:nth-child(2)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Compared to College, Career, and Civic Life (C3) Framework') { console.log('Passed: Standards Comparison - Compared to College, Career, and Civic Life (C3) Framework sub-title matched as expected'); } else { const message = `Expected: Standards Comparison - "Compared to College, Career, and Civic Life (C3) Framework" sub-title; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Compared to College, Career, and Civic Life (C3) Framework sub-title color matched as expected'); } else { const message = `Expected: Standards Comparison - Compared to College, Career, and Civic Life (C3) Framework sub-title color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Compared to College, Career, and Civic Life (C3) Framework sub-title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Compared to College, Career, and Civic Life (C3) Framework sub-title font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Social Studies results sub-title 2, text, and font size { description: 'Validate Standards Comparison - CA Social Studies results sub-title 2, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SS-chart-content b:nth-child(4)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Grade(s):') { console.log('Passed: Standards Comparison - Comparison for California Standards - Social Studies sub-title 2 matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for California Standards - Social Studies" sub-title 2; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for California Standards - Social Studies sub-title 2 color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Social Studies sub-title 2 color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for California Standards - Social Studies sub-title 2 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for California Standards - Social Studies sub-title 2 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - CA Social Studies results sub-title 3 text validation { description: 'Validate Standards Comparison - CA Social Studies results sub-title 3 text', action: async () => { try { const element = await driver.findElement(By.css('#SS-chart-content .mb-2')); //Get different versions of the text for debugging const fullText = await element.getText(); //Check for the expected text in different ways const expectedText = 'K,1,2,3,4,5,6,7,8,9,10,11,12'; const trimmedFullText = fullText.trim(); const firstLine = trimmedFullText.split('\n')[0].trim(); //Try multiple matching strategies if (firstLine.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found in first line`); } else if (trimmedFullText.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found within full text`); } else { throw new Error( `Text validation failed.\nExpected: "${expectedText}"\n` + `Full text: "${fullText}"\n` + `First line: "${firstLine}"\n` ); } } catch (error) { console.error('Detailed error during validation:', error); throw error; //Re-throw after logging } } }, //Standards Comparison - CA Social Studies results sub-title 4, text, and font size { description: 'Validate Standards Comparison - CA Social Studies results sub-title 4, text, and font size', action: async () => { const element = await driver.findElement(By.css('#SS-chart-content .mt-2 > b')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Number of comparisons: 980') { console.log('Passed: Standards Comparison - Number of comparisons: 980 sub-title 4 matched as expected'); } else { const message = `Expected: Standards Comparison - "Number of comparisons: 980" sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Number of comparisons: 980 sub-title 4 color matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 980 sub-title 4 color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Number of comparisons: 980 sub-title 4 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 980 sub-title 4 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Match value and color { description: 'Validate Standards Comparison - California donut chart Match value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-0')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0.1') { console.log('Passed: Standards Comparison - California donut chart Match value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match value "0.1"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -light green if (donutColor === 'rgba(101,209,117,1)') { console.log('Passed: Standards Comparison - California donut chart Match graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Match graph color "rgba(101,209,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Similar value and color { description: 'Validate Standards Comparison - California donut chart Similar value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-1')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '21.94') { console.log('Passed: Standards Comparison - California donut chart Similar value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar value "21.94"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -yellow if (donutColor === 'rgba(249,228,109,1)') { console.log('Passed: Standards Comparison - California donut chart Similar graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Similar graph color "rgba(249,228,109,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Partial value and color { description: 'Validate Standards Comparison - California donut chart Partial value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-2')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '48.27') { console.log('Passed: Standards Comparison - California donut chart Partial value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial value "48.27"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,1)') { console.log('Passed: Standards Comparison - California donut chart Partial graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Partial graph color "rgba(250,168,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut chart Low value and color { description: 'Validate Standards Comparison - California donut chart Low value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-3')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '29.69') { console.log('Passed: Standards Comparison - California donut chart Low value matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low value "29.69"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -pink if (donutColor === 'rgba(245,142,142,1)') { console.log('Passed: Standards Comparison - California donut chart Low graph color matched as expected'); } else { const message = `Expected: Standards Comparison - California donut chart Low graph color "rgba(245,142,142,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - California donut legend Match label { description: 'Validate Standards Comparison - California donut legend Match label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(1) > .apexcharts-legend-text')).getText(); if (elementText === 'Match') { console.log("Passed: Standards Comparison - California donut legend Match label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Match"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Similar label { description: 'Validate Standards Comparison - California donut legend Similar label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(2) > .apexcharts-legend-text')).getText(); if (elementText === 'Similar') { console.log("Passed: Standards Comparison - California donut legend Similar label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Similar"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Partial label { description: 'Validate Standards Comparison - California donut legend Partial label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(3) > .apexcharts-legend-text')).getText(); if (elementText === 'Partial') { console.log("Passed: Standards Comparison - California donut legend Partial label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Partial"; Actual: "${elementText}"`); } } }, //Standards Comparison - California donut legend Low label { description: 'Validate Standards Comparison - California donut legend Low label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(4) > .apexcharts-legend-text')).getText(); if (elementText === 'Low') { console.log("Passed: Standards Comparison - California donut legend Low label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - California donut legend label "Low"; Actual: "${elementText}"`); } } }, //Standards Comparison - Copyright info text, color, and font size { description: 'Validate Standards Comparison - Copyright info text, color, and font size', action: async () => { const element = await driver.findElement(By.css('#SS-chart-content small')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === '© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization.') { console.log('Passed: Standards Comparison - Copyright info text matched as expected'); } else { const message = `Expected: Standards Comparison - "© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization." sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Copyright info text color matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '10.4px') { console.log('Passed: Standards Comparison - Copyright info text font size matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text font size "10.4px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Graph Number of Records label { description: 'Validate Standards Comparison - Graph Number of Records label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-title-text')).getText(); if (elementText === 'Number of Records') { console.log("Passed: Standards Comparison - Graph Number of Records label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph label "Number of Records"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 500 label { description: 'Validate Standards Comparison - Graph Number of Records 500 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(1) > tspan')).getText(); if (elementText === '500') { console.log("Passed: Standards Comparison - Graph Number of Records 500 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "500"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 400 label { description: 'Validate Standards Comparison - Graph Number of Records 400 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(2) > tspan')).getText(); if (elementText === '400') { console.log("Passed: Standards Comparison - Graph Number of Records 400 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "400"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 300 label { description: 'Validate Standards Comparison - Graph Number of Records 300 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(3) > tspan')).getText(); if (elementText === '300') { console.log("Passed: Standards Comparison - Graph Number of Records 300 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "300"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 200 label { description: 'Validate Standards Comparison - Graph Number of Records 200 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(4) > tspan')).getText(); if (elementText === '200') { console.log("Passed: Standards Comparison - Graph Number of Records 200 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "200"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 100 label { description: 'Validate Standards Comparison - Graph Number of Records 100 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(5) > tspan')).getText(); if (elementText === '100') { console.log("Passed: Standards Comparison - Graph Number of Records 100 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "100"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 0 label { description: 'Validate Standards Comparison - Graph Number of Records 0 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(6) > tspan')).getText(); if (elementText === '0') { console.log("Passed: Standards Comparison - Graph Number of Records 0 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "0"; Actual: "${elementText}"`); } } }, //Standards Comparison - Bar Graph Match 1 value { description: 'Validate Standards Comparison - Bar Graph Match 1 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(1)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '1') { console.log('Passed: Standards Comparison - Bar Graph Match 1 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match value "1"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -green if (donutColor === 'rgba(101,209,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Match 1 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match 1 value graph color "rgba(101,209,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Similar 215 value { description: 'Validate Standards Comparison - Bar Graph Similar 215 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(2)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '215') { console.log('Passed: Standards Comparison - Bar Graph Similar 215 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar value "215"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -gold if (donutColor === 'rgba(249,228,109,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Similar 215 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar 215 value graph color "rgba(249,228,109,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Partial 473 value { description: 'Validate Standards Comparison - Bar Graph Partial 473 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(3)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '473') { console.log('Passed: Standards Comparison - Bar Graph Partial 473 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial value "473"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Partial 473 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial 473 value graph color "rgba(250,168,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Low 291 value { description: 'Validate Standards Comparison - Bar Graph Low 291 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(4)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '291') { console.log('Passed: Standards Comparison - Bar Graph Low 291 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low value "291"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(245,142,142,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Low 291 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low 291 value graph color "rgba(245,142,142,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Scroll to bottom of page { description: 'Scroll to bottom of page', action: async () => { await driver.executeScript('window.scrollTo({ top: document.body.scrollHeight, behavior: "smooth" });'); await driver.sleep(2000); } }, //ROW 1 //Standards Comparison Dataset excel table - Column 1 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 1 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 1 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 1 text and color', action: async () => { const element = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '49') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value "49"; Actual: "${elementText}"`; errors.push(message); } //Validate color -orange if (elementColor === 'rgba(250, 168, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value color "rgba(250, 168, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NCSSC3') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 1 text value "NCSSC3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'D1.1.K-2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 1 text value "D1.1.K-2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Explain why the compelling question is important to the student.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 1 text value "Explain why the compelling question is important to the student."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 1 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-5.HI.1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 1 text value "K-5.HI.1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Students summarize the key events of the era they are studying and explain the historical contexts of those events.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 1 text value "Students summarize the key events of the era they are studying and explain the historical contexts of those events."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Social Studies') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 1 text value "Social Studies"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 1 text value "K"; Actual: "${elementText}"`); } } }, //ROW 2 //Standards Comparison Dataset excel table - Column 1 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '2') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 2 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 2 text and color', action: async () => { const element = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '39') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value "39"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light red if (elementColor === 'rgba(245, 142, 142, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value color "rgba(245, 142, 142, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NCSSC3') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 2 text value "NCSSC3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'D1.2.K-2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 2 text value "D1.2.K-2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Identify disciplinary ideas associated with a compelling question.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 2 text value "Identify disciplinary ideas associated with a compelling question."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 2 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-5.HI.1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 2 text value "K-5.HI.1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Students summarize the key events of the era they are studying and explain the historical contexts of those events.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 2 text value "Students summarize the key events of the era they are studying and explain the historical contexts of those events."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Social Studies') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 2 text value "Social Studies"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 2 text value "K"; Actual: "${elementText}"`); } } }, //ROW 3 //Standards Comparison Dataset excel table - Column 1 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '3') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 3 text value "3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 3 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 3 text and color', action: async () => { const element = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '45') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value "45"; Actual: "${elementText}"`; errors.push(message); } //Validate color -orange if (elementColor === 'rgba(250, 168, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value color "rgba(250, 168, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NCSSC3') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 3 text value "NCSSC3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'D1.3.K-2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 3 text value "D1.3.K-2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Identify facts and concepts associated with a supporting question.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 3 text value "Identify facts and concepts associated with a supporting question."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 3 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-5.HI.1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 3 text value "K-5.HI.1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Students summarize the key events of the era they are studying and explain the historical contexts of those events.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 3 text value "Students summarize the key events of the era they are studying and explain the historical contexts of those events."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Social Studies') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 3 text value "Social Studies"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 3 text value "K"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 4 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 4 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 4 text and color', action: async () => { const element = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '28') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value "28"; Actual: "${elementText}"`; errors.push(message); } //Validate color -light red if (elementColor === 'rgba(245, 142, 142, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value color "rgba(245, 142, 142, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NCSSC3') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 4 text value "NCSSC3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'D1.4.K-2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 4 text value "D1.4.K-2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Make connections between supporting questions and compelling questions.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 4 text value "Make connections between supporting questions and compelling questions."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 4 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-5.HI.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 4 text value "K-5.HI.4."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Students conduct cost-benefit analyses of historical and current events.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 4 text value "Students conduct cost-benefit analyses of historical and current events."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Social Studies') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 4 text value "Social Studies"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 4 text value "K"; Actual: "${elementText}"`); } } }, //ROW 5 //Standards Comparison Dataset excel table - Column 1 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '5') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 5 text value "5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 5 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 5 text and color', action: async () => { const element = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '35') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value "35"; Actual: "${elementText}"`; errors.push(message); } //Validate color -orange if (elementColor === 'rgba(245, 142, 142, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value color "rgba(245, 142, 142, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'NCSSC3') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 5 text value "NCSSC3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'D1.5.K-2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 5 text value "D1.5.K-2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Determine the kinds of sources that will be helpful in answering compelling and supporting questions.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 5 text value "Determine the kinds of sources that will be helpful in answering compelling and supporting questions."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'CA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 5 text value "CA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'K-5.HI.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 5 text value "K-5.HI.4."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Students conduct cost-benefit analyses of historical and current events.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 5 text value "Students conduct cost-benefit analyses of historical and current events."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Social Studies') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 5 text value "Social Studies"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#SS-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 5 text value "K"; Actual: "${elementText}"`); } } }, //Standards Comparison - Scroll to top of page { description: 'Scroll to top of page', action: async () => { await driver.executeScript('window.scrollTo({ top: 0, behavior: "smooth" });'); await driver.sleep(2000); } }, //NEXT ACTION - Click Grades filter dropdown { description: 'Click Grades filter dropdown', action: async () => { //Select "Grades" from dropdown const gradesFilter = await driver.findElement(By.css('.form-inline .multiselect-selected-text')); await gradesFilter.click(); console.log('----->| NEXT ACTION: Clicked Grades filter dropdown'); await driver.sleep(2000); }, }, //Standards Comparison - Grades Dropdown validate multi-select dropdown values { description: 'Validate multi-select dropdown options', action: async () => { const expectedOptions = ['Select all', 'K', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']; const optionElements = await driver.findElements( By.css('ul.multiselect-container.dropdown-menu.show li label.checkbox') ); const actualOptions = []; for (const el of optionElements) { const text = (await el.getText()).trim(); actualOptions.push(text); } const errors = []; //Compare count if (expectedOptions.length !== actualOptions.length) { errors.push( `Expected: Dropdown options count "${expectedOptions.length}", Actual "${actualOptions.length}"` ); } //Compare text values (in order, up to the shorter list length) const maxLength = Math.max(expectedOptions.length, actualOptions.length); for (let i = 0; i < maxLength; i++) { const expected = expectedOptions[i]; const actual = actualOptions[i]; if (expected === undefined) { errors.push(`Extra item in actual list at index ${i}: "${actual}"`); } else if (actual === undefined) { errors.push(`Missing item in actual list at index ${i}: Expected "${expected}"`); } else if (expected !== actual) { errors.push(`At index ${i}: Expected "${expected}" but found "${actual}"`); } } //Throw combined message (so the framework marks this as failed) if (errors.length > 0) { throw new Error(errors.join('\n')); } console.log('Passed: Standards Comparison - Grades dropdown options matched as expected'); } }, //NEXT ACTION - Change Grades dropdown { description: 'Change Grades dropdown options', action: async () => { //Select all await driver.findElement(By.css('.show > .multiselect-item .checkbox')).click(); await driver.sleep(2000); //9th grade await driver.findElement(By.css('.show > li:nth-child(11) input')).click(); await driver.sleep(1000); //10th grade await driver.findElement(By.css('.show > li:nth-child(12) input')).click(); await driver.sleep(1000); //11th grade await driver.findElement(By.css('.show > li:nth-child(13) input')).click(); await driver.sleep(1000); //12th grade await driver.findElement(By.css('.show > li:nth-child(14) input')).click(); await driver.sleep(1000); //Grades label await driver.findElement(By.css('.float-right > .ml-1')).click(); await driver.sleep(1000); console.log('----->| NEXT ACTION: Selected grades 9-12'); } }, //Standards Comparison - Grades dropdown value and title { description: 'Validate Standards Comparison - Grades dropdown value and title', action: async () => { const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div.container > form > div.btn-group > button')); //Get text, color, and size const elementText = await element.getText(); const elementTitle = await element.getAttribute('title'); //Track all errors const errors = []; //Validate text if (elementText === '9, 10, 11, 12') { console.log('Passed: Standards Comparison - Grades dropdown value 9, 10, 11, 12 matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown value "9, 10, 11, 12"; Actual: "${elementText}"`; errors.push(message); } //Validate title if (elementTitle === '9, 10, 11, 12') { console.log('Passed: Standards Comparison - Grades dropdown title matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown title "9, 10, 11, 12"; Actual: "${elementTitle}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - State Dropdown selected value and options { description: 'Validate Standards Comparison - State Dropdown selected value and options', action: async () => { const elementDropdown = await driver.findElement(By.css('#compstate')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); const elementText = await selectedOption.getText(); const options = await elementDropdown.findElements(By.css('option')); //Track all errors const errors = []; if (elementText === 'California') { console.log('Passed: Standards Comparison - Sate Dropdown value California, matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown value "California"; Actual: "${elementText}"`); } const expected = [ 'Please select a state', 'Alabama', 'Arizona', 'California', 'Florida', 'New York', 'North Carolina', 'South Carolina', 'Texas', 'Washington' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Standards Comparison - State Dropdown list matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //NEXT ACTION - Select New York from State dropdown { description: 'Select New York from State dropdown', action: async () => { const location = await driver.findElement(By.css('#compstate > option:nth-child(6)')); //State dropdown await driver.findElement(By.css('#compstate')).click(); await driver.sleep(2000); //9th grade await driver.findElement(By.css('#compstate > option:nth-child(6)')).click(); await driver.sleep(1000); console.log('----->| NEXT ACTION: Selected New York'); } }, //Standards Comparison - State Dropdown selected value and options { description: 'Validate Standards Comparison - State Dropdown selected value and options', action: async () => { const elementDropdown = await driver.findElement(By.css('#compstate')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); const elementText = await selectedOption.getText(); const options = await elementDropdown.findElements(By.css('option')); //Track all errors const errors = []; if (elementText === 'New York') { console.log('Passed: Standards Comparison - Sate Dropdown value New York, matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown value "New York"; Actual: "${elementText}"`); } const expected = [ 'Please select a state', 'Alabama', 'Arizona', 'California', 'Florida', 'New York', 'North Carolina', 'South Carolina', 'Texas', 'Washington' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Standards Comparison - State Dropdown list matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //NEXT ACTION - Click Go button { description: 'Click Go button', action: async () => { await driver.findElement(By.css('#compbtn')).click(); await driver.sleep(2000); console.log('----->| NEXT ACTION: Clicked Go button'); } }, //Wait for page to load { description: 'Wait for page to fully load', action: async () => { //Wait until the element exists in the DOM const comparisonTitle = await driver.wait( until.elementLocated(By.css('#LA-chart-content .col-sm-12 > .text-color-accent')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(comparisonTitle), 20000 ); await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'Standards Comparison - Page did not fully load within 30 seconds'); console.log('Passed: Standards Comparison - Page loaded successfully'); await driver.sleep(5000); } }, //Standards Comparison - Title, text, and font size { description: 'Validate Standards Comparison - Page title text, color, and size', action: async () => { const element = await driver.findElement(By.css('h2')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Standards Comparison') { console.log('Passed: Standards Comparison - Page title matched as expected'); } else { const message = `Expected: "Standards Comparison" Page title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Page title text color matched as expected'); } else { const message = `Expected: Standards Comparison - Page title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '32px') { console.log('Passed: Standards Comparison - Page title text font-size matched as expected'); } else { const message = `Expected: Standards Comparison - Page title text font-size "32px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Grades dropdown label { description: 'Validate Standards Comparison - Grades dropdown label', action: async () => { const elementText = await driver.findElement(By.css('.float-right > .ml-1')).getText(); if (elementText === 'Grades') { console.log('Passed: Standards Comparison - Grades label matched as expected'); } else { throw new Error(`Expected: Standards Comparison - "Grades"; Actual: "${elementText}"`); } } }, //Standards Comparison - Grades dropdown value and title { description: 'Validate Standards Comparison - Grades dropdown value and title', action: async () => { const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div.container > form > div.btn-group > button')); //Get text, color, and size const elementText = await element.getText(); const elementTitle = await element.getAttribute('title'); //Track all errors const errors = []; //Validate text if (elementText === '9, 10, 11, 12') { console.log('Passed: Standards Comparison - Grades dropdown value 9, 10, 11, 12 matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown value "9, 10, 11, 12"; Actual: "${elementText}"`; errors.push(message); } //Validate title if (elementTitle === '9, 10, 11, 12') { console.log('Passed: Standards Comparison - Grades dropdown title matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown title "9, 10, 11, 12"; Actual: "${elementTitle}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - State dropdown label { description: 'Validate Standards Comparison - State dropdown label', action: async () => { const elementText = await driver.findElement(By.css('.form-control-label:nth-child(4)')).getText(); if (elementText === 'State') { console.log('Passed: Standards Comparison - State dropdown label matched as expected'); } else { throw new Error(`Expected: Standards Comparison - "Sate" dropdown label; Actual: "${elementText}"`); } } }, //Standards Comparison - globe icon { description: 'Verify Standards Comparison - globe icon is present', action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-earth-americas')), 5000).catch(() => false); if (!expectedIcon) { throw new Error('Expected: Standards Comparison - globe icon not found'); } console.log('Passed: Standards Comparison - globe icon is present'); } }, //Standards Comparison - State Dropdown selected value and options { description: 'Validate Standards Comparison - State Dropdown selected value and options', action: async () => { const elementDropdown = await driver.findElement(By.css('#compstate')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); const elementText = await selectedOption.getText(); const options = await elementDropdown.findElements(By.css('option')); //Track all errors const errors = []; if (elementText === 'New York') { console.log('Passed: Standards Comparison - Sate Dropdown value New York, matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown value "New York"; Actual: "${elementText}"`); } const expected = [ 'Please select a state', 'Alabama', 'Arizona', 'California', 'Florida', 'New York', 'North Carolina', 'South Carolina', 'Texas', 'Washington' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Standards Comparison - State Dropdown list matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - State dropdown Go button validation { description: 'Validate Standards Comparison - State dropdown Go button text and color', action: async () => { const element = await driver.findElement(By.css('#compbtn')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Go') { console.log('Passed: Standards Comparison - State dropdown Go button text matched as expected'); } else { const message = `Expected: Standards Comparison - "Go" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green or navy blue (depends on re-use) if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison - Go button color matched as expected'); } else if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Go button color matched as expected'); } else { const message = `Expected: Standards Comparison - Go button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Language Arts tab validation (active) { description: 'Validate Standards Comparison - Language Arts tab text and color', action: async () => { const element = await driver.findElement(By.css('#LA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Language Arts') { console.log('Passed: Standards Comparison - Language Arts tab text matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -white if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standards Comparison - Language Arts tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Mathematics tab validation (dimmed) { description: 'Validate Standards Comparison - Mathematics tab text and color', action: async () => { const element = await driver.findElement(By.css('#MA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Mathematics') { console.log('Passed: Standards Comparison - Mathematics tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Mathematics" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Mathematics tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Mathematics tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Science tab validation (dimmed) { description: 'Validate Standards Comparison - Science tab text and color', action: async () => { const element = await driver.findElement(By.css('#SC-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Science') { console.log('Passed: Standards Comparison - Science tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Science" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Science tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Science tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Social Studies tab validation (dimmed) { description: 'Validate Standards Comparison - Social Studies tab text and color', action: async () => { const element = await driver.findElement(By.css('#SS-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Social Studies') { console.log('Passed: Standards Comparison - Social Studies tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Social Studies" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Social Studies tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Social Studies tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:"Standards Comparison - Language Arts tab validation ( throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY Language Arts results title, text, and font size { description: 'Validate Standards Comparison - NY Language Arts results title, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content .col-sm-12 > .text-color-accent')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Comparison for New York Standards - Language Arts') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for New York Standards - Language Arts" title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for New York Standards - Language Arts title color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '24px') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for New York Standards - Language Arts title font size "24px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY Language Arts results sub-title 1, text, and font size { description: 'Validate Standards Comparison - NY Language Arts results sub-title 1, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content b:nth-child(2)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Compared to Common Core K-12 Standards') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts sub-title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for New York Standards - Language Arts" sub-title; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts sub-title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for New York Standards - Language Arts sub-title color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts sub-title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for New York Standards - Language Arts sub-title font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY Language Arts results sub-title 2, text, and font size { description: 'Validate Standards Comparison - NY Language Arts results sub-title 2, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content b:nth-child(4)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Grade(s):') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts sub-title 2 matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for New York Standards - Language Arts" sub-title 2; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts sub-title 2 color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for New York Standards - Language Arts sub-title 2 color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for New York Standards - Language Arts sub-title 2 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for New York Standards - Language Arts sub-title 2 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY Language Arts results sub-title 3 text validation { description: 'Validate Standards Comparison - NY Language Arts results sub-title 3 text', action: async () => { try { const element = await driver.findElement(By.css('#LA-chart-content .mb-2')); //Get different versions of the text for debugging const fullText = await element.getText(); //Check for the expected text in different ways const expectedText = '9,10,11,12'; const trimmedFullText = fullText.trim(); const firstLine = trimmedFullText.split('\n')[0].trim(); //Try multiple matching strategies if (firstLine.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found in first line`); } else if (trimmedFullText.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found within full text`); } else { throw new Error( `Text validation failed.\nExpected: "${expectedText}"\n` + `Full text: "${fullText}"\n` + `First line: "${firstLine}"\n` ); } } catch (error) { console.error('Detailed error during validation:', error); throw error; //Re-throw after logging } } }, //Standards Comparison - NY Language Arts results sub-title 4, text, and font size { description: 'Validate Standards Comparison - NY Language Arts results sub-title 4, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content .mt-2 > b')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Number of comparisons: 262') { console.log('Passed: Standards Comparison - Number of comparisons: 262 sub-title 4 matched as expected'); } else { const message = `Expected: Standards Comparison - "Number of comparisons: 262" sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Number of comparisons: 262 sub-title 4 color matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 262 sub-title 4 color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Number of comparisons: 262 sub-title 4 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 262 sub-title 4 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY donut chart Match value and color { description: 'Validate Standards Comparison - NY donut chart Match value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-0')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '58.78') { console.log('Passed: Standards Comparison - New York donut chart Match value matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Match value "58.78"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -light green if (donutColor === 'rgba(101,209,117,1)') { console.log('Passed: Standards Comparison - New York donut chart Match graph color matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Match graph color "rgba(101,209,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY donut chart Similar value and color { description: 'Validate Standards Comparison - NY donut chart Similar value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-1')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '29.01') { console.log('Passed: Standards Comparison - New York donut chart Similar value matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Similar value "29.01"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -yellow if (donutColor === 'rgba(249,228,109,1)') { console.log('Passed: Standards Comparison - New York donut chart Similar graph color matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Similar graph color "rgba(249,228,109,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY donut chart Partial value and color { description: 'Validate Standards Comparison - NY donut chart Partial value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-2')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '9.92') { console.log('Passed: Standards Comparison - New York donut chart Partial value matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Partial value "9.92"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,1)') { console.log('Passed: Standards Comparison - New York donut chart Partial graph color matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Partial graph color "rgba(250,168,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY donut chart Low value and color { description: 'Validate Standards Comparison - NY donut chart Low value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-3')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '2.29') { console.log('Passed: Standards Comparison - New York donut chart Low value matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Low value "2.29"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -pink if (donutColor === 'rgba(245,142,142,1)') { console.log('Passed: Standards Comparison - New York donut chart Low graph color matched as expected'); } else { const message = `Expected: Standards Comparison - New York donut chart Low graph color "rgba(245,142,142,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - NY donut legend Match label { description: 'Validate Standards Comparison - NY donut legend Match label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(1) > .apexcharts-legend-text')).getText(); if (elementText === 'Match') { console.log("Passed: Standards Comparison - New York donut legend Match label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - New York donut legend label "Match"; Actual: "${elementText}"`); } } }, //Standards Comparison - NY donut legend Similar label { description: 'Validate Standards Comparison - NY donut legend Similar label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(2) > .apexcharts-legend-text')).getText(); if (elementText === 'Similar') { console.log("Passed: Standards Comparison - New York donut legend Similar label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - New York donut legend label "Similar"; Actual: "${elementText}"`); } } }, //Standards Comparison - NY donut legend Partial label { description: 'Validate Standards Comparison - NY donut legend Partial label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(3) > .apexcharts-legend-text')).getText(); if (elementText === 'Partial') { console.log("Passed: Standards Comparison - New York donut legend Partial label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - New York donut legend label "Partial"; Actual: "${elementText}"`); } } }, //Standards Comparison - NY donut legend Low label { description: 'Validate Standards Comparison - NY donut legend Low label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(4) > .apexcharts-legend-text')).getText(); if (elementText === 'Low') { console.log("Passed: Standards Comparison - New York donut legend Low label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - New York donut legend label "Low"; Actual: "${elementText}"`); } } }, //Standards Comparison - Copyright info text, color, and font size { description: 'Validate Standards Comparison - Copyright info text, color, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content small')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === '© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization.') { console.log('Passed: Standards Comparison - Copyright info text matched as expected'); } else { const message = `Expected: Standards Comparison - "© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization." sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Copyright info text color matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '10.4px') { console.log('Passed: Standards Comparison - Copyright info text font size matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text font size "10.4px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Graph Number of Records label { description: 'Validate Standards Comparison - Graph Number of Records label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-title-text')).getText(); if (elementText === 'Number of Records') { console.log("Passed: Standards Comparison - Graph Number of Records label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph label "Number of Records"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 200 label { description: 'Validate Standards Comparison - Graph Number of Records 200 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(1) > tspan')).getText(); if (elementText === '200') { console.log("Passed: Standards Comparison - Graph Number of Records 200 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "200"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 150 label { description: 'Validate Standards Comparison - Graph Number of Records 150 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(2) > tspan')).getText(); if (elementText === '150') { console.log("Passed: Standards Comparison - Graph Number of Records 150 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "150"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 100 label { description: 'Validate Standards Comparison - Graph Number of Records 100 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(3) > tspan')).getText(); if (elementText === '100') { console.log("Passed: Standards Comparison - Graph Number of Records 100 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "100"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 50 label { description: 'Validate Standards Comparison - Graph Number of Records 50 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(4) > tspan')).getText(); if (elementText === '50') { console.log("Passed: Standards Comparison - Graph Number of Records 50 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "50"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 0 label { description: 'Validate Standards Comparison - Graph Number of Records 0 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(5) > tspan')).getText(); if (elementText === '0') { console.log("Passed: Standards Comparison - Graph Number of Records 0 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "0"; Actual: "${elementText}"`); } } }, //Standards Comparison - Bar Graph Match 154 value { description: 'Validate Standards Comparison - Bar Graph Match 154 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(1)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '154') { console.log('Passed: Standards Comparison - Bar Graph Match 154 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match value "154"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -green if (donutColor === 'rgba(101,209,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Match 154 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match 154 value graph color "rgba(101,209,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Similar 76 value { description: 'Validate Standards Comparison - Bar Graph Similar 76 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(2)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '76') { console.log('Passed: Standards Comparison - Bar Graph Similar 76 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar value "76"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -gold if (donutColor === 'rgba(249,228,109,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Similar 76 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar 76 value graph color "rgba(249,228,109,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Partial 26 value { description: 'Validate Standards Comparison - Bar Graph Partial 26 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(3)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '26') { console.log('Passed: Standards Comparison - Bar Graph Partial 26 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial value "26"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Partial 26 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial 26 value graph color "rgba(250,168,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Low 6 value { description: 'Validate Standards Comparison - Bar Graph Low 6 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(4)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '6') { console.log('Passed: Standards Comparison - Bar Graph Low 6 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low value "6"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(245,142,142,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Low 6 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low 6 value graph color "rgba(245,142,142,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Scroll to bottom of page { description: 'Scroll to bottom of page', action: async () => { await driver.executeScript('window.scrollTo({ top: document.body.scrollHeight, behavior: "smooth" });'); await driver.sleep(2000); } }, //ROW 1 //Standards Comparison Dataset excel table - Column 1 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 1 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 1 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 1 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '84') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value "84"; Actual: "${elementText}"`; errors.push(message); } //Validate color -yellow if (elementColor === 'rgba(249, 228, 109, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value color "rgba(249, 228, 109, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 1 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.9-10.1') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 1 text value "CCSS.ELA-Literacy.RL.9-10.1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Cite strong and thorough textual evidence to support analysis of what the text says explicitly as well as inferences drawn from the text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 1 text value "Cite strong and thorough textual evidence to support analysis of what the text says explicitly as well as inferences drawn from the text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'NY') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 1 text value "NY"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 1 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Read closely to determine what the text says explicitly/implicitly and make logical inferences from it; cite specific textual evidence when writing or speaking to support conclusions drawn from the text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 1 text value "Read closely to determine what the text says explicitly/implicitly and make logical inferences from it; cite specific textual evidence when writing or speaking to support conclusions drawn from the text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 1 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '9') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 1 text value "9"; Actual: "${elementText}"`); } } }, //ROW 2 //Standards Comparison Dataset excel table - Column 1 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '2') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 2 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 2 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '88') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value "88"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 2 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.9-10.2') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 2 text value "CCSS.ELA-Literacy.RL.9-10.2"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Determine a theme or central idea of a text and analyze in detail its development over the course of the text, including how it emerges and is shaped and refined by specific details; provide an objective summary of the text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 2 text value "Determine a theme or central idea of a text and analyze in detail its development over the course of the text, including how it emerges and is shaped and refined by specific details; provide an objective summary of the text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'NY') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 2 text value "NY"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === '9-10R2:') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 2 text value "9-10R2:"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Determine one or more themes or central ideas in a text and analyze its development, including how it emerges and is shaped and refined by specific details; objectively and accurately summarize a text. (RI&RL)') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 2 text value "Determine one or more themes or central ideas in a text and analyze its development, including how it emerges and is shaped and refined by specific details; objectively and accurately summarize a text. (RI&RL)"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 2 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '9') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 2 text value "9"; Actual: "${elementText}"`); } } }, //ROW 3 //Standards Comparison Dataset excel table - Column 1 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '3') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 3 text value "3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 3 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 3 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '84') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value "84"; Actual: "${elementText}"`; errors.push(message); } //Validate color -yellow if (elementColor === 'rgba(249, 228, 109, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value color "rgba(249, 228, 109, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 3 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.9-10.3') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 3 text value "CCSS.ELA-Literacy.RL.9-10.3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Analyze how complex characters (e.g., those with multiple or conflicting motivations) develop over the course of a text, interact with other characters, and advance the plot or develop the theme.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 3 text value "Analyze how complex characters (e.g., those with multiple or conflicting motivations) develop over the course of a text, interact with other characters, and advance the plot or develop the theme."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'NY') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 3 text value "NY"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === '9-10R3:') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 3 text value "9-10R3:"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Analyze how and why individuals, events, and ideas develop and interact over the course of a text. In literary texts, analyze how complex and/or dynamic characters develop, interact with other characters, advance the plot, or develop a theme. (RL) In informational texts, analyze how the author unfolds an analysis or argument, including the sequence, the introduction and development of ideas, and the connections that exist. (RI)') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 3 text value "Analyze how and why individuals, events, and ideas develop and interact over the course of a text. In literary texts, analyze how complex and/or dynamic characters develop, interact with other characters, advance the plot, or develop a theme. (RL) In informational texts, analyze how the author unfolds an analysis or argument, including the sequence, the introduction and development of ideas, and the connections that exist. (RI)"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 3 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '9') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 3 text value "K"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 4 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 4 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 4 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '90') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value "90"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 4 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.9-10.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 4 text value "CCSS.ELA-Literacy.RL.9-10.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Determine the meaning of words and phrases as they are used in the text, including figurative and connotative meanings; analyze the cumulative impact of specific word choices on meaning and tone (e.g., how the language evokes a sense of time and place; how it sets a formal or informal tone).') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 4 text value "Determine the meaning of words and phrases as they are used in the text, including figurative and connotative meanings; analyze the cumulative impact of specific word choices on meaning and tone (e.g., how the language evokes a sense of time and place; how it sets a formal or informal tone)."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'NY') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 4 text value "NY"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 4 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 4 text value "Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 4 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '9') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 4 text value "K"; Actual: "${elementText}"`); } } }, //ROW 5 //Standards Comparison Dataset excel table - Column 1 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '5') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 5 text value "5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 5 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 5 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '79') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value "79"; Actual: "${elementText}"`; errors.push(message); } //Validate color -yellow if (elementColor === 'rgba(249, 228, 109, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value color "rgba(249, 228, 109, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 5 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.9-10.5') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 5 text value "CCSS.ELA-Literacy.RL.9-10.5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === `Analyze how an author's choices concerning how to structure a text, order events within it (e.g., parallel plots), and manipulate time (e.g., pacing, flashbacks) create such effects as mystery, tension, or surprise.`) { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 5 text value "Analyze how an author's choices concerning how to structure a text, order events within it (e.g., parallel plots), and manipulate time (e.g., pacing, flashbacks) create such effects as mystery, tension, or surprise."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'NY') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 5 text value "NY"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === '9-10W3b:') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 5 text value "9-10W3b:"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Use narrative techniques, such as dialogue, pacing, description, reflection, and plot line(s) to develop experiences, events, and/or characters.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 5 text value "Use narrative techniques, such as dialogue, pacing, description, reflection, and plot line(s) to develop experiences, events, and/or characters."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 5 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === '9') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 5 text value "K"; Actual: "${elementText}"`); } } }, //Standards Comparison - Scroll to top of page { description: 'Scroll to top of page', action: async () => { await driver.executeScript('window.scrollTo({ top: 0, behavior: "smooth" });'); await driver.sleep(2000); } }, //NEXT ACTION - Click globe icon { description: 'Click globe icon', action: async () => { await driver.findElement(By.css('.fa-earth-americas')).click(); console.log('----->| NEXT ACTION: Clicked globe icon'); } }, //Wait for element { description: 'Wait for element to be visible', action: async () => { //Wait until the element exists in the DOM const elementVisible = await driver.wait( until.elementLocated(By.css('.modal-header:nth-child(10) > .modal-title')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(elementVisible), 20000 ); await driver.sleep(2000); } }, //Standards Comparison - Map DIV: Title { description: 'Validate Standards Comparison - Map DIV title text and color', action: async () => { const element = await driver.findElement(By.css('.modal-header:nth-child(10) > .modal-title')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text = if (elementText === 'Map') { console.log("Passed: Standards Comparison - Map DIV title matched as expected"); } else { const message = `Expected: Standards Comparison - "Map" DIV title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Map DIV title text color matched as expected'); } else { const message = `Expected: Standards Comparison - Map DIV title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '18px') { console.log('Passed: Standards Comparison - Map DIV title text font-size matched as expected'); } else { const message = `Expected: Standards Comparison - Map DIV title text font-size "18px"; Actual: "${elementSize}"`; errors.push(message); } //Throw once at the end (no additional console logs here) if (errors.length > 0) { throw new Error(errors.join('\n')); } } }, //Standards Comparison - Map DIV: X icon color -red { description: 'Validate Standards Comparison - Map DIV X icon color', action: async () => { const elementStyle = await driver.findElement(By.css('.modal-header:nth-child(10) span')).getCssValue('color'); if (elementStyle === 'rgba(246, 60, 40, 1)') { console.log('Passed: Standards Comparison - Map DIV X icon color matched as expected'); } else { throw new Error(`Expected: Standards Comparison - Map DIV X icon color did not match; Actual: "${elementStyle}"`); } } }, //Standards Comparison - Map DIV: Grades label { description: 'Validate Standards Comparison - Grades label', action: async () => { const elementText = await driver.findElement(By.css('.float-right > .form-inline > .form-control-label')).getText(); if (elementText === 'Grades') { console.log("Passed: Standards Comparison - Map DIV Grades label matched as expected"); } else { throw new Error(`Expected: "Grades"; Actual: "${elementText}"`); } } }, //Standards Comparison - Map DIV: Grades Dropdown validate multi-select dropdown values { description: 'Validate multi-select dropdown options', action: async () => { //Find the BUTTON (not just the inner span) const button = await driver.findElement(By.css('button.custom-select-button-modal')); const elementText = await button.findElement(By.css('.multiselect-selected-text')).getText(); const elementTitle = await button.getAttribute('title'); const errors = []; //Validate visible text if (elementText === 'K-12') { console.log('Passed: Standards Comparison - Map DIV Grades dropdown value K-12 matched as expected'); } else { const message = `Expected: "K-12"; Actual: "${elementText}"`; errors.push(message); } //Validate title attribute if (elementTitle === 'K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12') { console.log('Passed: Standards Comparison - Map DIV Grades dropdown title matched as expected'); } else { const message = `Expected title: "K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"; Actual: "${elementTitle}"`; errors.push(message); } //Throw combined errors if any if (errors.length > 0) { throw new Error(errors.join('\n')); } } }, //Standards Comparison - Map DIV: Instructions label { description: 'Validate Standards Comparison - Instructions label', action: async () => { const elementText = await driver.findElement(By.css('.float-right > div:nth-child(4)')).getText(); if (elementText === 'US State Map (Clickable to select a state)') { console.log("Passed: Standards Comparison - Map DIV instructions text matched as expected"); } else { throw new Error(`Expected: "US State Map (Clickable to select a state)"; Actual: "${elementText}"`); } } }, //Standards Comparison - Map DIV: Cancel button { description: 'Validate Standards Comparison - Cancel button text and color', action: async () => { const element = await driver.findElement(By.css('.modal-footer:nth-child(12) > .btn-secondary')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text = if (elementText === 'Cancel') { console.log("Passed: Standards Comparison - Map DIV Cancel button text matched as expected"); } else { const message = `Expected: "Cancel"; Actual: "${elementText}"`; errors.push(message); } //Validate color -clear if (elementColor === 'rgba(0, 0, 0, 0)') { console.log('Passed: Standards Comparison - Map DIV Cancel button color matched as expected'); } else { const message = `Expected: "Cancel" button text color "rgba(0, 0, 0, 0)"; Actual: "${elementColor}"`; errors.push(message); } //Throw once at the end (no additional console logs here) if (errors.length > 0) { throw new Error(errors.join('\n')); } } }, //Standards Comparison - Map DIV: Confirm button { description: 'Validate Standards Comparison - Confirm button text and color', action: async () => { const element = await driver.findElement(By.css('#modalConfirm')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text = if (elementText === 'Confirm') { console.log("Passed: Standards Comparison - Map DIV Confirm button text matched as expected"); } else { const message = `Expected: "Confirm"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison - Map DIV Confirm button color matched as expected'); } else { const message = `Expected: "Confirm" button text color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw once at the end (no additional console logs here) if (errors.length > 0) { throw new Error(errors.join('\n')); } } }, //NEXT ACTION - Click Washington state { description: 'Click Washington state', action: async () => { await driver.findElement(By.css('.cmm-usa-state-wa > text')).click(); console.log('----->| NEXT ACTION: Clicked Washington state'); } }, //Wait for page to load { description: 'Wait for page to fully load', action: async () => { //Wait until the element exists in the DOM const comparisonTitle = await driver.wait( until.elementLocated(By.css('#LA-chart-content .col-sm-12 > .text-color-accent')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(comparisonTitle), 20000 ); await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'Standards Comparison - Page did not fully load within 30 seconds'); console.log('Passed: Standards Comparison - Page loaded successfully'); await driver.sleep(5000); } }, //Standards Comparison - Title, text, and font size { description: 'Validate Standards Comparison - Page title text, color, and size', action: async () => { const element = await driver.findElement(By.css('h2')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Standards Comparison') { console.log('Passed: Standards Comparison - Page title matched as expected'); } else { const message = `Expected: "Standards Comparison" Page title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Page title text color matched as expected'); } else { const message = `Expected: Standards Comparison - Page title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '32px') { console.log('Passed: Standards Comparison - Page title text font-size matched as expected'); } else { const message = `Expected: Standards Comparison - Page title text font-size "32px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Grades dropdown label { description: 'Validate Standards Comparison - Grades dropdown label', action: async () => { const elementText = await driver.findElement(By.css('.float-right > .ml-1')).getText(); if (elementText === 'Grades') { console.log('Passed: Standards Comparison - Grades label matched as expected'); } else { throw new Error(`Expected: Standards Comparison - "Grades"; Actual: "${elementText}"`); } } }, //Standards Comparison - Grades dropdown value and title { description: 'Validate Standards Comparison - Grades dropdown value and title', action: async () => { const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div.container > form > div.btn-group > button')); //Get text, color, and size const elementText = await element.getText(); const elementTitle = await element.getAttribute('title'); //Track all errors const errors = []; //Validate text if (elementText === 'K-12') { console.log('Passed: Standards Comparison - Grades dropdown value K-12 matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown value "K-12"; Actual: "${elementText}"`; errors.push(message); } //Validate title if (elementTitle === 'K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12') { console.log('Passed: Standards Comparison - Grades dropdown title matched as expected'); } else { const message = `Expected: Standards Comparison - Grades dropdown title "K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"; Actual: "${elementTitle}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - State dropdown label { description: 'Validate Standards Comparison - State dropdown label', action: async () => { const elementText = await driver.findElement(By.css('.form-control-label:nth-child(4)')).getText(); if (elementText === 'State') { console.log('Passed: Standards Comparison - State dropdown label matched as expected'); } else { throw new Error(`Expected: Standards Comparison - "Sate" dropdown label; Actual: "${elementText}"`); } } }, //Standards Comparison - globe icon { description: 'Verify Standards Comparison - globe icon is present', action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-earth-americas')), 5000).catch(() => false); if (!expectedIcon) { throw new Error('Expected: Standards Comparison - globe icon not found'); } console.log('Passed: Standards Comparison - globe icon is present'); } }, //Standards Comparison - State Dropdown selected value and options { description: 'Validate Standards Comparison - State Dropdown selected value and options', action: async () => { const elementDropdown = await driver.findElement(By.css('#compstate')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); const elementText = await selectedOption.getText(); const options = await elementDropdown.findElements(By.css('option')); //Track all errors const errors = []; if (elementText === 'Washington') { console.log('Passed: Standards Comparison - Sate Dropdown value Washington, matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown value "Washington"; Actual: "${elementText}"`); } const expected = [ 'Please select a state', 'Alabama', 'Arizona', 'California', 'Florida', 'New York', 'North Carolina', 'South Carolina', 'Texas', 'Washington' ]; const actual = []; for (const opt of options) { const text = (await opt.getText()).trim(); actual.push(text); } if (JSON.stringify(actual) === JSON.stringify(expected)) { console.log('Passed: Standards Comparison - State Dropdown list matched as expected'); } else { throw new Error(`Expected: Standards Comparison - State Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - State dropdown Go button validation { description: 'Validate Standards Comparison - State dropdown Go button text and color', action: async () => { const element = await driver.findElement(By.css('#compbtn')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Go') { console.log('Passed: Standards Comparison - State dropdown Go button text matched as expected'); } else { const message = `Expected: Standards Comparison - "Go" button text; Actual: "${elementText}"`; errors.push(message); } //Validate color -green or navy blue (depends on re-use) if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards Comparison - Go button color matched as expected'); } else if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Go button color matched as expected'); } else { const message = `Expected: Standards Comparison - Go button color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Language Arts tab validation (active) { description: 'Validate Standards Comparison - Language Arts tab text and color', action: async () => { const element = await driver.findElement(By.css('#LA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Language Arts') { console.log('Passed: Standards Comparison - Language Arts tab text matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -white if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standards Comparison - Language Arts tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Language Arts tab color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Mathematics tab validation (dimmed) { description: 'Validate Standards Comparison - Mathematics tab text and color', action: async () => { const element = await driver.findElement(By.css('#MA-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Mathematics') { console.log('Passed: Standards Comparison - Mathematics tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Mathematics" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Mathematics tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Mathematics tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Science tab validation (dimmed) { description: 'Validate Standards Comparison - Science tab text and color', action: async () => { const element = await driver.findElement(By.css('#SC-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Science') { console.log('Passed: Standards Comparison - Science tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Science" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Science tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Science tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Social Studies tab validation (dimmed) { description: 'Validate Standards Comparison - Social Studies tab text and color', action: async () => { const element = await driver.findElement(By.css('#SS-tab')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //Validate text if (elementText === 'Social Studies') { console.log('Passed: Standards Comparison - Social Studies tab text matched as expected'); } else { const message = `Expected: Standards Comparison - "Social Studies" tab text; Actual: "${elementText}"`; errors.push(message); } //Validate color -gray if (elementColor === 'rgba(240, 240, 240, 1)') { console.log('Passed: Standards Comparison - Social Studies tab color matched as expected'); } else { const message = `Expected: Standards Comparison - Social Studies tab color "rgba(240, 240, 240, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:"Standards Comparison - Language Arts tab validation ( throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA Language Arts results title, text, and font size { description: 'Validate Standards Comparison - WA Language Arts results title, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content .col-sm-12 > .text-color-accent')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Comparison for Washington Standards - Language Arts') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for Washington Standards - Language Arts" title; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for Washington Standards - Language Arts title color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '24px') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for Washington Standards - Language Arts title font size "24px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA Language Arts results sub-title 1, text, and font size { description: 'Validate Standards Comparison - WA Language Arts results sub-title 1, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content b:nth-child(2)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Compared to Common Core K-12 Standards') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for Washington Standards - Language Arts" sub-title; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA Language Arts results sub-title 2, text, and font size { description: 'Validate Standards Comparison - WA Language Arts results sub-title 2, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content b:nth-child(4)')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Grade(s):') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title 2 matched as expected'); } else { const message = `Expected: Standards Comparison - "Comparison for Washington Standards - Language Arts" sub-title 2; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title 2 color matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title 2 color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title 2 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Comparison for Washington Standards - Language Arts sub-title 2 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA Language Arts results sub-title 3 text validation { description: 'Validate Standards Comparison - WA Language Arts results sub-title 3 text', action: async () => { try { const element = await driver.findElement(By.css('#LA-chart-content .mb-2')); //Get different versions of the text for debugging const fullText = await element.getText(); //Check for the expected text in different ways const expectedText = '9,10,11,12'; const trimmedFullText = fullText.trim(); const firstLine = trimmedFullText.split('\n')[0].trim(); //Try multiple matching strategies if (firstLine.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found in first line`); } else if (trimmedFullText.includes(expectedText)) { console.log(`Passed: Standards Comparison - Grades: ${expectedText} text found within full text`); } else { throw new Error( `Text validation failed.\nExpected: "${expectedText}"\n` + `Full text: "${fullText}"\n` + `First line: "${firstLine}"\n` ); } } catch (error) { console.error('Detailed error during validation:', error); throw error; //Re-throw after logging } } }, //Standards Comparison - WA Language Arts results sub-title 4, text, and font size { description: 'Validate Standards Comparison - WA Language Arts results sub-title 4, text, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content .mt-2 > b')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === 'Number of comparisons: 912') { console.log('Passed: Standards Comparison - Number of comparisons: 912 sub-title 4 matched as expected'); } else { const message = `Expected: Standards Comparison - "Number of comparisons: 912" sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -navy blue if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standards Comparison - Number of comparisons: 912 sub-title 4 color matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 912 sub-title 4 color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '13px') { console.log('Passed: Standards Comparison - Number of comparisons: 912 sub-title 4 font size matched as expected'); } else { const message = `Expected: Standards Comparison - Number of comparisons: 912 sub-title 4 font size "13px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA donut chart Match value and color { description: 'Validate Standards Comparison - WA donut chart Match value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-0')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '98.79') { console.log('Passed: Standards Comparison - Washington donut chart Match value matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Match value "98.79"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -light green if (donutColor === 'rgba(101,209,117,1)') { console.log('Passed: Standards Comparison - Washington donut chart Match graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Match graph color "rgba(101,209,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA donut chart Similar value and color { description: 'Validate Standards Comparison - WA donut chart Similar value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-1')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '1.21') { console.log('Passed: Standards Comparison - Washington donut chart Similar value matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Similar value "1.21"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -yellow if (donutColor === 'rgba(249,228,109,1)') { console.log('Passed: Standards Comparison - Washington donut chart Similar graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Similar graph color "rgba(249,228,109,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA donut chart Partial value and color { description: 'Validate Standards Comparison - WA donut chart Partial value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-2')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - Washington donut chart Partial value matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Partial value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -orange if (donutColor === 'rgba(250,168,117,1)') { console.log('Passed: Standards Comparison - Washington donut chart Partial graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Partial graph color "rgba(250,168,117,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA donut chart Low value and color { description: 'Validate Standards Comparison - WA donut chart Low value and color', action: async () => { const element = await driver.findElement(By.css('.apexcharts-donut-slice-3')); //Get data attribute and label const donutValue = await element.getAttribute('data:value'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - Washington donut chart Low value matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Low value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -pink if (donutColor === 'rgba(245,142,142,1)') { console.log('Passed: Standards Comparison - Washington donut chart Low graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Washington donut chart Low graph color "rgba(245,142,142,1)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - WA donut legend Match label { description: 'Validate Standards Comparison - WA donut legend Match label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(1) > .apexcharts-legend-text')).getText(); if (elementText === 'Match') { console.log("Passed: Standards Comparison - Washington donut legend Match label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Washington donut legend label "Match"; Actual: "${elementText}"`); } } }, //Standards Comparison - WA donut legend Similar label { description: 'Validate Standards Comparison - WA donut legend Similar label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(2) > .apexcharts-legend-text')).getText(); if (elementText === 'Similar') { console.log("Passed: Standards Comparison - Washington donut legend Similar label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Washington donut legend label "Similar"; Actual: "${elementText}"`); } } }, //Standards Comparison - WA donut legend Partial label { description: 'Validate Standards Comparison - WA donut legend Partial label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(3) > .apexcharts-legend-text')).getText(); if (elementText === 'Partial') { console.log("Passed: Standards Comparison - Washington donut legend Partial label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Washington donut legend label "Partial"; Actual: "${elementText}"`); } } }, //Standards Comparison - WA donut legend Low label { description: 'Validate Standards Comparison - WA donut legend Low label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-legend-series:nth-child(4) > .apexcharts-legend-text')).getText(); if (elementText === 'Low') { console.log("Passed: Standards Comparison - Washington donut legend Low label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Washington donut legend label "Low"; Actual: "${elementText}"`); } } }, //Standards Comparison - Copyright info text, color, and font size { description: 'Validate Standards Comparison - Copyright info text, color, and font size', action: async () => { const element = await driver.findElement(By.css('#LA-chart-content small')); //Get text, color, and size const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); const elementSize = await element.getCssValue('font-size'); //Track all errors const errors = []; //Validate text if (elementText === '© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization.') { console.log('Passed: Standards Comparison - Copyright info text matched as expected'); } else { const message = `Expected: Standards Comparison - "© 2025 EdGate, LLC. This information may not be shared with any entity or individual outside of your organization." sub-title 4; Actual: "${elementText}"`; errors.push(message); } //Validate color -dark gray if (elementColor === 'rgba(99, 99, 99, 1)') { console.log('Passed: Standards Comparison - Copyright info text color matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text color "rgba(99, 99, 99, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Validate font size if (elementSize === '10.4px') { console.log('Passed: Standards Comparison - Copyright info text font size matched as expected'); } else { const message = `Expected: Standards Comparison - Copyright info text font size "10.4px"; Actual: "${elementSize}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Graph Number of Records label { description: 'Validate Standards Comparison - Graph Number of Records label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-title-text')).getText(); if (elementText === 'Number of Records') { console.log("Passed: Standards Comparison - Graph Number of Records label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph label "Number of Records"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 1000 label { description: 'Validate Standards Comparison - Graph Number of Records 1000 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(1) > tspan')).getText(); if (elementText === '1000') { console.log("Passed: Standards Comparison - Graph Number of Records 1000 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "1000"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 800 label { description: 'Validate Standards Comparison - Graph Number of Records 800 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(2) > tspan')).getText(); if (elementText === '800') { console.log("Passed: Standards Comparison - Graph Number of Records 800 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "800"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 600 label { description: 'Validate Standards Comparison - Graph Number of Records 600 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(3) > tspan')).getText(); if (elementText === '600') { console.log("Passed: Standards Comparison - Graph Number of Records 600 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "600"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 400 label { description: 'Validate Standards Comparison - Graph Number of Records 400 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-yaxis-label:nth-child(4) > tspan')).getText(); if (elementText === '400') { console.log("Passed: Standards Comparison - Graph Number of Records 400 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "400"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 200 label { description: 'Validate Standards Comparison - Graph Number of Records 200 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(5) > tspan')).getText(); if (elementText === '200') { console.log("Passed: Standards Comparison - Graph Number of Records 200 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "200"; Actual: "${elementText}"`); } } }, //Standards Comparison - Graph Number of Records 0 label { description: 'Validate Standards Comparison - Graph Number of Records 0 label', action: async () => { const elementText = await driver.findElement(By.css('.apexcharts-text:nth-child(6) > tspan')).getText(); if (elementText === '0') { console.log("Passed: Standards Comparison - Graph Number of Records 0 label matched as expected"); } else { throw new Error(`Expected: Standards Comparison - Graph Number of Records "0"; Actual: "${elementText}"`); } } }, //Standards Comparison - Bar Graph Match 901 value { description: 'Validate Standards Comparison - Bar Graph Match 901 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(1)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '901') { console.log('Passed: Standards Comparison - Bar Graph Match 901 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match value "901"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -green if (donutColor === 'rgba(101,209,117,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Match 901 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Match 901 value graph color "rgba(101,209,117,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Similar 11 value { description: 'Validate Standards Comparison - Bar Graph Similar 11 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(2)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '11') { console.log('Passed: Standards Comparison - Bar Graph Similar 11 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar value "11"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -gold if (donutColor === 'rgba(249,228,109,0.85)') { console.log('Passed: Standards Comparison - Bar Graph Similar 11 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Similar 11 value graph color "rgba(249,228,109,0.85)"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Partial 0 value { description: 'Validate Standards Comparison - Bar Graph Partial 0 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(3)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - Bar Graph Partial 0 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -none if (donutColor === 'none') { console.log('Passed: Standards Comparison - Bar Graph Partial 0 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Partial 0 value graph color "none"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Bar Graph Low 0 value { description: 'Validate Standards Comparison - Bar Graph Low 0 value', action: async () => { const element = await driver.findElement(By.css('.apexcharts-bar-area:nth-child(4)')); //Get data attribute and label const donutValue = await element.getAttribute('val'); const donutColor = await element.getAttribute('fill'); //Track all errors const errors = []; //Validate text if (donutValue === '0') { console.log('Passed: Standards Comparison - Bar Graph Low 0 value matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low value "0"; Actual: "${donutValue}"`; errors.push(message); } //Validate color -none if (donutColor === 'none') { console.log('Passed: Standards Comparison - Bar Graph Low 0 value graph color matched as expected'); } else { const message = `Expected: Standards Comparison - Bar Graph Low 0 value graph color "none"; Actual: "${donutColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison - Scroll to bottom of page { description: 'Scroll to bottom of page', action: async () => { await driver.executeScript('window.scrollTo({ top: document.body.scrollHeight, behavior: "smooth" });'); await driver.sleep(2000); } }, //ROW 1 //Standards Comparison Dataset excel table - Column 1 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '1') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 1 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 1 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 1 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 1 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 1 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 1 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.1') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 1 text value "CCSS.ELA-Literacy.RL.K.1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'With prompting and support, ask and answer questions about key details in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 1 text value "With prompting and support, ask and answer questions about key details in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'WA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 1 text value "WA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RI.K.1.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 1 text value "RI.K.1."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'With prompting and support, ask and answer questions about key details in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 1 text value "With prompting and support, ask and answer questions about key details in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 1 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 1 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 1 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(1) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 1 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 1 text value "K"; Actual: "${elementText}"`); } } }, //ROW 2 //Standards Comparison Dataset excel table - Column 1 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '2') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 2 text value "1"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 2 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 2 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '99') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value "99"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 2 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 2 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 2 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.2') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 2 text value "CCSS.ELA-Literacy.RL.K.2"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'With prompting and support, retell familiar stories, including key details.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 2 text value "With prompting and support, retell familiar stories, including key details."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'WA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 2 text value "WA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.2.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 2 text value "RL.K.2."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'With prompting and support, retell familiar stories, including key details.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 2 text value "With prompting and support, retell familiar stories, including key details."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 2 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 2 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 2 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(2) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 2 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 2 text value "K"; Actual: "${elementText}"`); } } }, //ROW 3 //Standards Comparison Dataset excel table - Column 1 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '3') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 3 text value "3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 3 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 3 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 3 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 3 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 3 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.3') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 3 text value "CCSS.ELA-Literacy.RL.K.3"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'With prompting and support, identify characters, settings, and major events in a story.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 3 text value "With prompting and support, identify characters, settings, and major events in a story."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'WA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 3 text value "WA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.3.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 3 text value "RL.K.3."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'With prompting and support, identify characters, settings, and major events in a story.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 3 text value "With prompting and support, identify characters, settings, and major events in a story."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 3 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 3 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 3 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(3) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 3 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 3 text value "K"; Actual: "${elementText}"`); } } }, //ROW 4 //Standards Comparison Dataset excel table - Column 1 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '4') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 4 text value "4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 4 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 4 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '100') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value "100"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 4 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 4 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 4 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.4') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 4 text value "CCSS.ELA-Literacy.RL.K.4"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === 'Ask and answer questions about unknown words in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 4 text value "Ask and answer questions about unknown words in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'WA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 4 text value "WA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.4.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 4 text value "RL.K.4."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Ask and answer questions about unknown words in a text.') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 4 text value "Ask and answer questions about unknown words in a text."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 4 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 4 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 4 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(4) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 4 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 4 text value "K"; Actual: "${elementText}"`); } } }, //ROW 5 //Standards Comparison Dataset excel table - Column 1 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 1 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(1)')).getText(); if (elementText === '5') { console.log("Passed: Standards Comparison Dataset excel table - Column 1 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 1 Row 5 text value "5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 2 Row 5 text and color { description: 'Validate Standards Comparison Dataset excel table - Column 2 Row 5 text and color', action: async () => { const element = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell > span')); //Get text and color const elementText = await element.getText(); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //Validate text if (elementText === '99') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value "99"; Actual: "${elementText}"`; errors.push(message); } //Validate color -green if (elementColor === 'rgba(101, 209, 117, 1)') { console.log('Passed: Standards Comparison Dataset excel table - Column 2 Row 5 value color matched as expected'); } else { const message = `Expected: Standards Comparison Dataset excel table - Column 2 Row 5 value color "rgba(101, 209, 117, 1)"; Actual: "${elementColor}"`; errors.push(message); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift('Multiple validation checks did not pass'); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards Comparison Dataset excel table - Column 3 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 3 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(5)')).getText(); if (elementText === 'CCK12') { console.log("Passed: Standards Comparison Dataset excel table - Column 3 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 3 Row 5 text value "CCK12"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 4 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 4 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(7)')).getText(); if (elementText === 'CCSS.ELA-Literacy.RL.K.5') { console.log("Passed: Standards Comparison Dataset excel table - Column 4 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 4 Row 5 text value "CCSS.ELA-Literacy.RL.K.5"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 5 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 5 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(9)')).getText(); if (elementText === "Recognize common types of texts (e.g., storybooks, poems).") { console.log("Passed: Standards Comparison Dataset excel table - Column 5 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 5 Row 5 text value "Recognize common types of texts (e.g., storybooks, poems)."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 6 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 6 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(11)')).getText(); if (elementText === 'WA') { console.log("Passed: Standards Comparison Dataset excel table - Column 6 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 6 Row 5 text value "WA"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 7 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 7 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(13)')).getText(); if (elementText === 'RL.K.5.') { console.log("Passed: Standards Comparison Dataset excel table - Column 7 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 7 Row 5 text value "RL.K.5."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 8 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 8 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(15)')).getText(); if (elementText === 'Recognize common types of texts (e.g., storybooks, poems).') { console.log("Passed: Standards Comparison Dataset excel table - Column 8 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 8 Row 5 text value "Recognize common types of texts (e.g., storybooks, poems)."; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 9 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 9 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(17)')).getText(); if (elementText === 'Language Arts') { console.log("Passed: Standards Comparison Dataset excel table - Column 9 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 9 Row 5 text value "Language Arts"; Actual: "${elementText}"`); } } }, //Standards Comparison Dataset excel table - Column 10 Row 5 text { description: 'Validate Standards Comparison Dataset excel table - Column 10 Row 5 text', action: async () => { const elementText = await driver.findElement(By.css('#LA-data-table .tabulator-row:nth-child(5) > .tabulator-cell:nth-child(19)')).getText(); if (elementText === 'K') { console.log("Passed: Standards Comparison Dataset excel table - Column 10 Row 5 text value matched as expected"); } else { throw new Error(`Expected: Standards Comparison Dataset excel table - Column 10 Row 5 text value "K"; Actual: "${elementText}"`); } } }, //LOG OUT //NEXT ACTION - Log out { description: 'Log out of EXACT', action: async () => { //Profile link await driver.findElement(By.css('#navbarDropdown > span')).click(); await driver.sleep(1000); //Log Out await driver.findElement(By.linkText('Log Out')).click(); console.log('----->| NEXT ACTION: Clicked User Profile and Logged out'); await driver.sleep(1000); } }, //Wait for page to load { description: 'Wait for page to fully load', action: async () => { //Wait until the element exists in the DOM const loginButton = await driver.wait( until.elementLocated(By.css('.login')), 20000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(loginButton), 20000 ); await driver.wait(async () => { const readyState = await driver.executeScript('return document.readyState'); return readyState === 'complete'; }, 30000, 'ExACT landing page did not fully load within 30 seconds'); console.log('----------------->| LOGGED OUT SUCCESSFULLY |<-----------------'); await driver.sleep(5000); } }, ]; const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => { const json_data = XLSX.utils.sheet_to_json(worksheet, { header: 1 }); json_data.push([stepIndex, stepDescription, status, timestamp, screenshotPath]); return XLSX.utils.aoa_to_sheet(json_data); }; const takeScreenshot = async (driver, stepIndex, stepDescription) => { const screenshot = await driver.takeScreenshot(); const dir = path.join('screenshots', 'dashboardSemanticStandardsComparison'); const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`; const screenshotPath = path.join(dir, screenshotFileName); fs.writeFileSync(screenshotPath, screenshot, 'base64'); return screenshotPath; }; const clearOldResults = () => { //Remove old screenshots const screenshotDir = path.join('screenshots', 'dashboardSemanticStandardsComparison'); if (fs.existsSync(screenshotDir)) { fs.rmSync(screenshotDir, { recursive: true, force: true }); } fs.mkdirSync(screenshotDir, { recursive: true }); //Remove old Excel file if (fs.existsSync('dashboardSemanticStandardsComparisonResults.xlsx')) { fs.unlinkSync('dashboardSemanticStandardsComparisonResults.xlsx'); } }; try { //Initialize workbook and worksheet clearOldResults(); //Initialize workbook and worksheet workbook = XLSX.utils.book_new(); worksheet = XLSX.utils.aoa_to_sheet([ ['Step Number', 'Step Description', 'Status', 'Timestamp', 'Screenshot'] ]); XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1'); //Log test start time worksheet = logStep(worksheet, 'Test Start', 'Started', '', startTime, ''); let allStepsPassed = true; for (const step of steps) { const stepIndex = steps.indexOf(step) + 1; const timestamp = new Date().toISOString(); try { //Screenshot of failed step await step.action(); //Log a successful step with no screenshot worksheet = logStep( worksheet, step.description, 'Passed', stepIndex, timestamp, null //No screenshot for passed steps ); } catch (error) { //Only take screenshot if the step fails const screenshotPath = await takeScreenshot( driver, stepIndex, `${step.description}_Failed` ); worksheet = logStep( worksheet, step.description, 'Failed', stepIndex, timestamp, screenshotPath ); console.error(`Step ${stepIndex} FAILED: ${error.message}`); testStatus = 'Failed'; allStepsPassed = false; } } //Check if log out was successful const loginButton = await driver.wait(until.elementLocated(By.css('.login')), 5000).catch(() => false); if (loginButton && allStepsPassed) { console.log('PASSED: Semantic Standards Comparison Widget(ExACT_dashboardSemanticStandardsComparison); All test steps completed successfully'); testStatus = 'Passed'; } else { console.log('FAILED: Semantic Standards Comparison Widget(ExACT_dashboardSemanticStandardsComparison); One or more test steps failed'); testStatus = 'Failed'; } //Log test end time const endTime = new Date().toISOString(); worksheet = logStep(worksheet, 'Test End', testStatus, '', endTime, ''); //Write the updated worksheet back to the workbook and save it workbook.Sheets['Sheet1'] = worksheet; XLSX.writeFile(workbook, 'dashboardSemanticStandardsComparisonResults.xlsx'); } finally { await driver.quit(); } })(); } export default ExACT_dashboardSemanticStandardsComparison;