Playwright start

This commit is contained in:
2026-05-30 10:04:12 -04:00
parent 73f29cea08
commit 1f7a0819fc
108 changed files with 37445 additions and 62 deletions
+17
View File
@@ -0,0 +1,17 @@
class BasePage {
constructor(website) {
this.website = website;
}
get url() {
throw new Error('Subclasses must implement url');
}
async getLinks() {
const content = this.website.find('content');
const links = content.locator('a');
return await links.evaluateAll(els => els.map(el => el.getAttribute('href')).filter(Boolean));
}
}
module.exports = BasePage;