diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index a2a8645f0..96decd2f8 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -2169,6 +2169,8 @@ class Playwright extends Helper { let chunked = chunkArray(attrs, values.length); chunked = chunked.filter((val) => { for (let i = 0; i < val.length; ++i) { + // the attribute could be a boolean + if (typeof val[i] === 'boolean') return val[i] === values[i]; // if the attribute doesn't exist, returns false as well if (!val[i] || !val[i].includes(values[i])) return false; } diff --git a/lib/helper/Puppeteer.js b/lib/helper/Puppeteer.js index bbc187acb..0880222b4 100644 --- a/lib/helper/Puppeteer.js +++ b/lib/helper/Puppeteer.js @@ -1825,6 +1825,8 @@ class Puppeteer extends Helper { for (let i = 0; i < val.length; ++i) { const _actual = Number.isNaN(val[i]) || (typeof values[i]) === 'string' ? val[i] : Number.parseInt(values[i], 10); const _expected = Number.isNaN(values[i]) || (typeof values[i]) === 'string' ? values[i] : Number.parseInt(values[i], 10); + // the attribute could be a boolean + if (typeof _actual === 'boolean') return _actual === _expected; // if the attribute doesn't exist, returns false as well if (!_actual || !_actual.includes(_expected)) return false; } diff --git a/lib/helper/WebDriver.js b/lib/helper/WebDriver.js index 0102fb823..f0ed73ee3 100644 --- a/lib/helper/WebDriver.js +++ b/lib/helper/WebDriver.js @@ -1612,6 +1612,8 @@ class WebDriver extends Helper { for (let i = 0; i < val.length; ++i) { const _actual = Number.isNaN(val[i]) || (typeof values[i]) === 'string' ? val[i] : Number.parseInt(val[i], 10); const _expected = Number.isNaN(values[i]) || (typeof values[i]) === 'string' ? values[i] : Number.parseInt(values[i], 10); + // the attribute could be a boolean + if (typeof _actual === 'boolean') return _actual === _expected; if (_actual !== _expected) return false; } return true; diff --git a/test/data/app/view/index.php b/test/data/app/view/index.php index 08ccb7c0f..c25c9565e 100755 --- a/test/data/app/view/index.php +++ b/test/data/app/view/index.php @@ -25,6 +25,10 @@ Spinner +