{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"元素聚焦"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"元素聚焦","__idx":0},"children":["元素聚焦"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["节点类型 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["browser_focusElement"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"功能说明","__idx":1},"children":["功能说明"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["将键盘焦点移到指定元素。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"客户端配置界面","__idx":2},"children":["客户端配置界面"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/focus-element.059f817c9aa22acb41216183ad5689f8c6a380e957a48dee3dd2954be0c34eb9.0538f3a9.webp","alt":"元素聚焦节点的客户端配置界面"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["截图来自 MoreLogin 桌面客户端 V2.73.101 的英文界面。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"输入字段","__idx":3},"children":["输入字段"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下字段位于 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.browserUi.inputs"]},"。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"字段"},"children":["字段"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"类型或取值"},"children":["类型或取值"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Schema 必填"},"children":["Schema 必填"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"执行默认值"},"children":["执行默认值"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"说明与边界"},"children":["说明与边界"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selectorType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"selector\""]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"element\""]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"frame\""]},"（支持变量引用）"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"selector\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["元素来源 编辑器初值 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"selector\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["frame"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["iframe 框架变量"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["element"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["元素变量"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selectorRadio"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"CSS\""]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"XPath\""]},"（支持变量引用）"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"CSS\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["定位方式 编辑器初值 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"CSS\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selector"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["选择器"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"fixed\""]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"randomInterval\""]},"（支持变量引用）"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"fixed\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["如果匹配到多个元素对象时 编辑器初值 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"fixed\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serial"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WorkflowNumber"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["元素序号; integer; minimum after resolution: 1 编辑器初值 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialMin"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WorkflowNumber"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最小序号; integer; minimum after resolution: 1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialMax"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WorkflowNumber"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最大序号; integer; minimum after resolution: 1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postWaitMs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WorkflowNumber"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["否"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["完成后等待时长（毫秒）; minimum after resolution: 0 编辑器初值 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"条件与边界","__idx":4},"children":["条件与边界"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["定位规则："]}," selectorType=selector 要求 selector；frame 要求 frame+selector；element 要求前序 ElementRef 引用。serial 从 1 开始；randomInterval 使用 serialMin/serialMax，最小值不能大于最大值；先等待选择器匹配到元素，再一次性取序号：区间上限按实际匹配数截断；固定序号或区间下限大于匹配数时立即返回 ELEMENT_NOT_FOUND（reason=range，details.field 为 serial 或 serialMin），不操作页面。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["校验错误码 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RPA_NODE_INPUT_INVALID"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"输入引用","__idx":5},"children":["输入引用"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"字段"},"children":["字段"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"允许的形式"},"children":["允许的形式"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selectorType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["template"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["frame"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["template"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["element"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["template"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selectorRadio"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["template"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selector"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["template"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["template"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serial"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numericExpression"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialMin"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numericExpression"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialMax"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numericExpression"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postWaitMs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["literal"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numericExpression"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"输出字段","__idx":6},"children":["输出字段"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"输出字段"},"children":["输出字段"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"类型或取值"},"children":["类型或取值"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tabId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["element"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ElementRef"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isFocused"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["按契约用 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["${nodeId.data.field}"]}," 引用公开字段。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"json-示例","__idx":7},"children":["JSON 示例"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["可放入流程 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nodes"]}," 数组或其他节点 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["blocks"]}," 中的完整节点对象。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"focus_email\",\n  \"type\": \"browser_focusElement\",\n  \"data\": {\n    \"title\": \"聚焦邮箱输入框\",\n    \"browserAction\": \"focusElement\",\n    \"browserUi\": {\n      \"inputs\": {\n        \"selectorType\": \"selector\",\n        \"selectorRadio\": \"CSS\",\n        \"selector\": \"input[name=email]\",\n        \"postWaitMs\": 200\n      },\n      \"exception\": {\n        \"timeout\": 30000,\n        \"policy\": \"interrupt\"\n      }\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/browser-rpa/nodes"},"children":["返回节点目录"]}]}]},"headings":[{"value":"元素聚焦","id":"元素聚焦","depth":1},{"value":"功能说明","id":"功能说明","depth":2},{"value":"客户端配置界面","id":"客户端配置界面","depth":2},{"value":"输入字段","id":"输入字段","depth":2},{"value":"条件与边界","id":"条件与边界","depth":2},{"value":"输入引用","id":"输入引用","depth":2},{"value":"输出字段","id":"输出字段","depth":2},{"value":"JSON 示例","id":"json-示例","depth":2}],"frontmatter":{"seo":{"title":"元素聚焦"}},"lastModified":"2026-11-20T14:40:39.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh/browser-rpa/nodes/interaction/focus-element","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}