playwright-table
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -21,2 +21,15 @@ "use strict"; | ||
let headers = Array.from(((_a = table.tHead) === null || _a === void 0 ? void 0 : _a.rows[0].cells) || [], cell => cell.innerText); | ||
if (headers.length === 0) { | ||
loop_tbody: for (let tBody of table.tBodies) { | ||
for (let row of tBody.rows) { | ||
for (let cell of row.cells) { | ||
if (cell.tagName == 'TH') { | ||
headers.push(cell.innerText); | ||
} | ||
} | ||
if (headers.length > 0) | ||
break loop_tbody; | ||
} | ||
} | ||
} | ||
if (headers.length === 0) | ||
@@ -23,0 +36,0 @@ continue; |
{ | ||
"name": "playwright-table", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Collect tabular data from HTML Table Elements as object array or 2D string array", | ||
@@ -38,11 +38,11 @@ "keywords": [ | ||
"peerDependencies": { | ||
"playwright": "^1.28.1" | ||
"playwright": "^1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.11.9", | ||
"playwright": "^1.28.1", | ||
"@types/node": "^18.17.14", | ||
"playwright": "^1.37.1", | ||
"ts-node": "^10.9.1", | ||
"ts-node-dev": "^2.0.0", | ||
"typescript": "^4.9.3" | ||
"typescript": "^4.9.5" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8718
102