Script problem with openning DIV

This commit is contained in:
2025-09-05 10:25:05 -07:00
parent 3a37a3d9ba
commit 89e71b4fa7

View File

@@ -111,8 +111,8 @@ const steps = [
description: 'Validate Dashboard My Content Item Count',
action: async () => {
const elementText = await driver.findElement(By.css('#badge_content_total')).getText();
if (elementText !== '3527 items') {
throw new Error(`Expected: "3527 items"; Actual: "${elementText}"`);
if (elementText !== '3552 items') {
throw new Error(`Expected: "3552 items"; Actual: "${elementText}"`);
}
console.log('Passed: Dashboard - My Content Item Count matched as expected');
}
@@ -472,8 +472,8 @@ const steps = [
description: 'Validate My Content Totals DIV - Total Items Count',
action: async () => {
const elementText = await driver.findElement(By.css('#total > b')).getText();
if (elementText !== '3527') {
throw new Error(`Expected: "3527"; Actual: "${elementText}"`);
if (elementText !== '3552') {
throw new Error(`Expected: "3552"; Actual: "${elementText}"`);
}
console.log('Passed: My Content Totals DIV - Total Items Count matched as expected');
}
@@ -532,8 +532,8 @@ const steps = [
description: 'Validate My Content Totals DIV - Unique Titles Count',
action: async () => {
const elementText = await driver.findElement(By.css('#total_titles > b')).getText();
if (elementText !== '6433') {
throw new Error(`Expected: "6433"; Actual: "${elementText}"`);
if (elementText !== '6573') {
throw new Error(`Expected: "6573"; Actual: "${elementText}"`);
}
console.log('Passed: My Content Totals DIV - Unique Titles Count matched as expected');
}
@@ -592,8 +592,8 @@ const steps = [
description: 'Validate My Content Totals DIV - Unique IDs Count',
action: async () => {
const elementText = await driver.findElement(By.css('#total_pubtotalids > b')).getText();
if (elementText !== '5531') {
throw new Error(`Expected: "5531"; Actual: "${elementText}"`);
if (elementText !== '5602') {
throw new Error(`Expected: "5602"; Actual: "${elementText}"`);
}
console.log('Passed: My Content Totals DIV - Unique IDs Count matched as expected');
}
@@ -979,7 +979,7 @@ const steps = [
{ description: 'Click X icon', action: async () => await driver.findElement(By.css('.modal-lg .modal-header span')).click() },
{ description: 'Driver sleep', action: async () => await driver.sleep(2000) },
//BIOLOGY - QA ITEM COUNT CHECK
/*BIOLOGY - QA ITEM COUNT CHECK {DIV NOT OPENING - SELENIUM ISSUE}
//NEXT ACTION -Verify Biology - QA item Count
{ description: 'Click Biology-QA item Count link', action: async () => await driver.findElement(By.css('#mycontentlist > #content-org-list > .content-org .badge')).click() },
{ description: 'Wait for My Content Totals DIV to open', action: async () => await driver.sleep(5000) },
@@ -1255,7 +1255,7 @@ const steps = [
//NEXT ACTION -Click Close DIV button
{ description: 'Click My Contents Count DIV Close button', action: async () => await driver.findElement(By.css('#all_content_modal .btn-secondary')).click() },
{ description: 'Wait for My Content Totals DIV to close', action: async () => await driver.sleep(2000) },
{ description: 'Wait for My Content Totals DIV to close', action: async () => await driver.sleep(2000) },*/
//NEXT ACTION -Click My Content ellipsis icon
{ description: 'Click Ellipsis icon', action: async () => await driver.findElement(By.css('.fa-ellipsis-h')).click() },
@@ -2119,7 +2119,7 @@ const steps = [
{
description: `Verify ${createContentSetName} checkbox icon is present`,
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(19) input')), 5000).catch(() => false);
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(20) input')), 5000).catch(() => false);
if (!expectedIcon) {
throw new Error(`Expected: Export "${createContentSetName}" checkbox icon not found`);
}
@@ -2131,7 +2131,7 @@ const steps = [
{
description: `Validate export ${createContentSetName} handle text`,
action: async () => {
const elementText = await driver.findElement(By.css('.show > li:nth-child(19) .checkbox')).getText();
const elementText = await driver.findElement(By.css('.show > li:nth-child(20) .checkbox')).getText();
if (elementText !== createContentSetName) {
throw new Error(`Expected: "${createContentSetName}"; Actual: "${elementText}"`);
}
@@ -2140,7 +2140,7 @@ const steps = [
},
//NEXT ACTION -Select created content set to export
{ description: 'Click Automated QA checkbox', action: async () => await driver.findElement(By.css('.show > li:nth-child(19) input')).click() },
{ description: 'Click Automated QA checkbox', action: async () => await driver.findElement(By.css('.show > li:nth-child(20) input')).click() },
{ description: 'Browser sleep', action: async () => await driver.sleep(2000) },
{ description: 'Click Export button', action: async () => await driver.findElement(By.css('.modal-footer:nth-child(6) > .btn-primary')).click() },
{ description: 'Wait for export page to load', action: async () => await driver.sleep(5000) },