ruyi_select_frame
Select a target iframe/frame using its context ID or CSS selector. This enables subsequent scripts to run within the chosen frame by referencing its frameContextId.
Instructions
选择指定的 iframe/frame。contextId(从 ruyi_list_frames 获取)最稳定;也可传 selector,由 ruyiPage 1.2.54 通过 iframe.contentWindow 精确映射 srcdoc 或同 URL frame。选择后的 frame 可在后续 evaluate_script 中通过 frameContextId 参数操作。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageIdx | No | 标签页索引 | |
| selector | No | iframe/frame 元素选择器;与 contextId 二选一 | |
| contextId | No | frame 的 browsing context ID |