Skip to content

evaluate_script fails with iframe elements while click works #439

@marwan38

Description

@marwan38

Description of the bug

IFrame handling seems to be inconsistent. I am able to pass a UUID of an iframe, or a child of, (take_snapshot does correctly return iframe and their children ⭐) to click and it works flawlessly. Passing it to evaluate_script on the other hand throws a "JSHandles can be evaluated only in the context they were created" error.

Reproduction

use evaluate_script with a uuid of an iframe, or a child of it.

Expectation

If a UUID from a snapshot works with click, it should work with evaluate_script.

Actual:
Using a UUID of an iframe, or a child of, throws "JSHandles can be evaluated only in the context they were created".. while it works with click

MCP configuration

No response

Node version

No response

Chrome version

No response

Coding agent version

No response

Model version

No response

Chat log

No response

Operating system

None

Extra checklist

  • I want to provide a PR to fix this bug

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions