{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Tap(x, y)","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":"tapx-y","__idx":0},"children":["Tap(x, y)"]},{"$$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":["以下详细介绍 Tap(x, y) 函数。"]},{"$$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":["X（数值）"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Y（数值）"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["您可以通过云端手机上的",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/rparobotic-process-automation/02-using-rpa/04-developer-tools"},"children":["开发者工具"]},"获取 X 和 Y 坐标值。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[坐标随机偏移]"]},"（数值）"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["默认值为 0。设置偏移值后，每次点击的位置都会在偏移范围内随机向上、向下、向左或向右偏移。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例如，如果设置 X: 50，Y: 100，并且随机坐标偏移量为 10，则 X 的范围为 40px–60px，Y 的范围为 90px–110px。"]},{"$$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":"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":"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":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["状态（成功/失败）"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"示例","__idx":3},"children":["示例"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例如，在云手机桌面上有一个 Google Play 商店。通过开发者工具，发现其中心点坐标为 (X: 927, Y: 1326)。参数如下："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| 键 | 说明 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| :--------------------------- | :------------------ |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["坐标"]}," | X: \"927\", Y: \"1326\" |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["坐标随机偏移"]}," | 0 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["点击类型"]}," | 单击 |"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["| ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["点击后延迟"]}," | 0 |"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"相关节点","__idx":4},"children":["相关节点"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/rparobotic-process-automation/03-node/01-simulation-operations/07-swipe-page"},"children":["滑动页面"]}]}]},"headings":[{"value":"Tap(x, y)","id":"tapx-y","depth":1},{"value":"参数","id":"参数","depth":2},{"value":"输出","id":"输出","depth":2},{"value":"示例","id":"示例","depth":2},{"value":"相关节点","id":"相关节点","depth":2}],"frontmatter":{"seo":{"title":"Tap(x, y)"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh/rparobotic-process-automation/03-node/01-simulation-operations/05-tap-x-y","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}