{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"通过文本识别 (OCR) 实现点击","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"通过文本识别-ocr-实现点击","__idx":0},"children":["通过文本识别 (OCR) 实现点击"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["RPA 提供三种模拟点击的方式："]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/rparobotic-process-automation/03-node/01-simulation-operations/04-tap-element"},"children":["点击元素"]},": 通过 UI 树的 DOM 元素定位并点击当前元素。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/rparobotic-process-automation/03-node/01-simulation-operations/05-tap-x-y"},"children":["点击(x, y)"]},": 通过当前屏幕的 X 轴和 Y 轴坐标定位点击位置。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/rparobotic-process-automation/03-node/01-simulation-operations/06-click-via-ocr"},"children":["通过文本识别 (OCR) 实现点击"]},": 通过识别当前屏幕上的文本位置来实现点击。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下详细介绍通过文本识别 (OCR) 实现点击的功能。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"参数","__idx":1},"children":["参数"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["输入匹配文本"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["您可以在屏幕上输入文本。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["当页面上存在多个匹配对象时"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["获取单个元素"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["获取元素列表"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["匹配对象后点击"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["开启：找到元素后点击"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["关闭：仅找到元素"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["点击位置"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["中心点"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["匹配对象区域内的随机点"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["自定义"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["相对于中心点的偏移量"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["您可以通过相对于元素中心点的偏移量来调整点击位置。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["点击类型"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["单击"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["双击"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["长按"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["找到元素后的延迟"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"输出","__idx":2},"children":["输出"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"输出参数","__idx":3},"children":["输出参数"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["文本区域：{ \"height\": 30, \"left\": 343, \"width\": 142, \"top\": 332, \"centerY\": 347, \"centerX\": 414, \"bottom\": 362, \"right\": 485 }"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"输出字段说明","__idx":4},"children":["输出字段说明"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| 键 | 说明 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| :------ | :------------------------------------------------- |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| height | 元素高度 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| width | 元素宽度 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| top | 元素顶部的 Y 轴坐标 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| left | 元素左侧的 X 轴坐标 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| bottom | 元素底部的 Y 轴坐标 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| right | 元素右侧的 X 轴坐标 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| centerY |元素中心的 Y 轴坐标 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| centerX | 元素中心的 X 轴坐标 |"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"执行日志","__idx":5},"children":["执行日志"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["开始时间"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["结束时间"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["持续时间 (毫秒)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["状态 (成功/失败)"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"示例","__idx":6},"children":["示例"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例如，在云手机桌面上，希望点击 Chrome 浏览器。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"配置如下","__idx":7},"children":["配置如下："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["输入匹配文本"]},": \"Chrome\""]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["当页面上存在多个匹配对象时"]},": \"获取单个元素\""]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["匹配对象后点击"]},": \"开启\""]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["点击位置"]},": \"中心点\""]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["点击类型"]},": \"单击\""]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["找到元素后延迟"]},": \"0\""]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"输出参数-1","__idx":8},"children":["输出参数："]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["文本区域: { \"height\": 30, \"left\": 343, \"width\": 142, \"top\": 332, \"centerY\": 347, \"centerX\": 414, \"bottom\": 362, \"right\": 485 }"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"相关节点","__idx":9},"children":["相关节点"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["点击元素"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["运行 JS 脚本"]}]},"headings":[{"value":"通过文本识别 (OCR) 实现点击","id":"通过文本识别-ocr-实现点击","depth":1},{"value":"参数","id":"参数","depth":2},{"value":"输出","id":"输出","depth":2},{"value":"输出参数","id":"输出参数","depth":3},{"value":"输出字段说明","id":"输出字段说明","depth":4},{"value":"执行日志","id":"执行日志","depth":3},{"value":"示例","id":"示例","depth":2},{"value":"配置如下：","id":"配置如下","depth":3},{"value":"输出参数：","id":"输出参数-1","depth":3},{"value":"相关节点","id":"相关节点","depth":2}],"frontmatter":{"seo":{"title":"通过文本识别 (OCR) 实现点击"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh/rparobotic-process-automation/03-node/01-simulation-operations/06-click-via-ocr","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}