chore: fix operation over cdp (#440)
Ref https://github.com/microsoft/playwright-mcp/issues/439
This commit is contained in:
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user