()
| 499 | } |
| 500 | |
| 501 | async toOuterHTML() { |
| 502 | switch (this.helperType) { |
| 503 | case 'playwright': |
| 504 | return this.element.evaluate(el => el.outerHTML) |
| 505 | case 'puppeteer': |
| 506 | return this.element.evaluate(el => el.outerHTML) |
| 507 | case 'webdriver': |
| 508 | return this.helper.browser.execute(el => el.outerHTML, this.element) |
| 509 | default: |
| 510 | throw new Error(`Unsupported helper type: ${this.helperType}`) |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | async toSimplifiedHTML(maxLength = 300) { |
| 515 | const outerHTML = await this.toOuterHTML() |
no test coverage detected