chore: fix operation over cdp (#440)
Ref https://github.com/microsoft/playwright-mcp/issues/439
This commit is contained in:
parent
c2b7fb29de
commit
1318e39fac
4 changed files with 46 additions and 53 deletions
|
|
@ -40,6 +40,9 @@ export class PageSnapshot {
|
|||
}
|
||||
|
||||
private async _build() {
|
||||
// FIXME: Rountrip evaluate to ensure _snapshotForAI works.
|
||||
// This probably broke once we moved off locator snapshots
|
||||
await this._page.evaluate(() => 1);
|
||||
const snapshot = await callOnPageNoTrace(this._page, page => (page as PageEx)._snapshotForAI());
|
||||
this._text = [
|
||||
`- Page Snapshot`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue