├── .env ├── .env.example ├── .gitignore ├── README.md ├── docs ├── .vitepress │ ├── config.ts │ ├── lib │ │ └── vRemixicon.ts │ └── theme │ │ ├── CustomLayout.vue │ │ ├── CustomNotFound.vue │ │ ├── custom.css │ │ ├── index.ts │ │ └── redirectRoutes.ts ├── blocks │ ├── active-tab.md │ ├── attribute-value.md │ ├── blocks-group.md │ ├── browser-event.md │ ├── clipboard.md │ ├── close-tab.md │ ├── conditions.md │ ├── cookie.md │ ├── create-element.md │ ├── data-mapping.md │ ├── delay.md │ ├── delete-data.md │ ├── element-exists.md │ ├── element-scroll.md │ ├── event-click.md │ ├── execute-workflow.md │ ├── export-data.md │ ├── forms.md │ ├── get-text.md │ ├── go-back.md │ ├── go-forward.md │ ├── google-drive.md │ ├── google-sheets-drive.md │ ├── google-sheets.md │ ├── handle-dialog.md │ ├── handle-download.md │ ├── hover-element.md │ ├── increase-variable.md │ ├── insert-data.md │ ├── javascript-code.md │ ├── link.md │ ├── log-data.md │ ├── loop-breakpoint.md │ ├── loop-data.md │ ├── loop-elements.md │ ├── new-tab.md │ ├── new-window.md │ ├── notification.md │ ├── parameter-prompt.md │ ├── press-key.md │ ├── proxy.md │ ├── regex-variable.md │ ├── reload-tab.md │ ├── repeat-task.md │ ├── save-assets.md │ ├── slice-variable.md │ ├── sort-data.md │ ├── switch-tab.md │ ├── switch-to.md │ ├── tab-url.md │ ├── take-screenshot.md │ ├── trigger-event.md │ ├── trigger.md │ ├── upload-file.md │ ├── wait-connections.md │ ├── webhook.md │ ├── while-loop.md │ └── workflow-state.md ├── extension-builder.md ├── extension-builder │ ├── analytics.md │ ├── crash-logs.md │ ├── customize.md │ ├── dashboard.md │ ├── details.md │ ├── global-variables.md │ ├── index.md │ ├── installing-extension.md │ ├── version-control.md │ └── workflows.md ├── guide │ └── quick-start.md ├── index.md ├── integrations │ └── google-drive.md ├── parts │ └── blocks-interaction-note.md ├── public │ └── images │ │ ├── alipay.jpg │ │ ├── blocks │ │ ├── 192127832-38b73b5f-1bd0-458c-8a1c-311d85e2446b.png │ │ ├── Frame_3_2_h8miwx.png │ │ ├── Loop_elements_a4btqz.png │ │ ├── NVIDIA_Share_rWFjFA6ooQ_h3rtoq.png │ │ ├── Screenshot_2022-07-06_134530_pyuvbm.png │ │ ├── chrome_72yxN1cG5r_wofhvv.png │ │ ├── chrome_7ehs03LPjU_i0ivn2.png │ │ ├── chrome_9iHTFjxWEn_lzavjy.png │ │ ├── chrome_J5wCfHbV0k_cadz80.png │ │ ├── chrome_JQ9AV5L07X_fmvf5u.png │ │ ├── chrome_NLkqno9pxO_hbudur.png │ │ ├── chrome_OXTZ3YmUTg_x8cq9g.png │ │ ├── chrome_OuX2wQzOe4_lyd8tv.png │ │ ├── chrome_Uwmb1sgeiJ_sukqfu.png │ │ ├── chrome_WVkHHFa8UF_toqssq.png │ │ ├── chrome_ZJm8cwo6Z5_xeqekg.png │ │ ├── chrome_b0wdnqRYv1_vknvhm.png │ │ ├── chrome_gcNslvkyzZ_yqeco7.png │ │ ├── chrome_h0O8snWxOY_xxdeyg.png │ │ ├── chrome_rAyUAIdWI3_agnydv.png │ │ ├── chrome_wH5Q79djOe_wlbudv.png │ │ ├── chrome_yUjnbDYYP7_hm4bwq.png │ │ ├── fieqmvqf5kb5seudggp4.png │ │ ├── insner_2_mrslmt.png │ │ ├── loop_bd2por.gif │ │ ├── not-specific-flow_gsawj3.gif │ │ ├── nsAkHeuetG_xg5awo.png │ │ ├── specific-flow_hpfqsb.gif │ │ ├── tabs_ctqmdm.png │ │ └── unknown_cphb4u.png │ │ ├── extension-builder │ │ ├── NVIDIA_Share_S9UYH5Yvj0_xolyl2.png │ │ ├── NVIDIA_Share_dUepZN5bIB_egirro.png │ │ ├── NVIDIA_Share_mqfTPWmLcJ_z0eczs.png │ │ ├── chrome_9ZfKdZtANI_udrijd.png │ │ ├── chrome_AfQp0IW1FS_rtllad.png │ │ ├── chrome_AtuR0TLqzm_rypyqd.png │ │ ├── chrome_VtPVnKGH3q_uigdsc.png │ │ ├── chrome_cmge12BVxE_adzlrp.png │ │ ├── chrome_j3pk8zBstl_jorgmn.png │ │ └── installing-extension_hkiiu9.gif │ │ ├── guide │ │ ├── adding-block_pobloe.gif │ │ ├── chrome_Rf7Lj54yi4_i5gdua.png │ │ ├── chrome_VecbzZKdar_swld5q.png │ │ └── start-recording_hpfg9u.gif │ │ ├── logo.png │ │ ├── reference │ │ ├── NVIDIA_Share_XTiF5TkhOX_wxfkgd.png │ │ ├── NVIDIA_Share_ZYqbANNey2_cvmvt1.png │ │ ├── NVIDIA_Share_eyqm3SIAKx_kiot08.png │ │ ├── NVIDIA_Share_lGV2S0XYJE_y6qs8h.png │ │ ├── NVIDIA_Share_qWlIzKSYIx_cvxe6w.png │ │ ├── chrome_D5csgMXyoj_okm03f.png │ │ ├── chrome_emrfNdNVz0_jgecef.png │ │ ├── chrome_hIZ8wpD5CC_dh5nfw.png │ │ ├── chrome_xzwsxBADvq_f5povx.png │ │ ├── package-IO_lzpfoz.gif │ │ ├── package-as-block_xbi00q.gif │ │ └── package-workflow_i2hme2.gif │ │ ├── workflow │ │ ├── 2v0Ss79X7j_a102aw.png │ │ ├── B2cPsIplxO_m06lfr.png │ │ ├── Screenshot_2023-08-28_143223_swcorv.png │ │ ├── TV_-_1_bjh9j7.png │ │ ├── TV_-_2_2_r3emea.png │ │ ├── block-menu_lq1vig.gif │ │ ├── block-settings_ppatjo.gif │ │ ├── breakpoint_njdfvg.gif │ │ ├── chrome_05KtZ48UEI_oyrlmp.png │ │ ├── chrome_1VtcrxMGH7_d7puxa.png │ │ ├── chrome_3DsPWQ4Nn3_hwyu8h.png │ │ ├── chrome_7p2d3nvu9w_funwit.png │ │ ├── chrome_7wEPnPfNRQ_e1ee2l.png │ │ ├── chrome_8d0k1lZqUn_lxnycp.png │ │ ├── chrome_EJW6qAdZCn_hqacml.png │ │ ├── chrome_FbRbTGuOXy_j8frph.png │ │ ├── chrome_IzphSu4LiK_gehwmw.png │ │ ├── chrome_JbjCbwnmQ1_apo7kh.png │ │ ├── chrome_K7BmBkZ2gZ_o7k6fi (1).png │ │ ├── chrome_K7BmBkZ2gZ_o7k6fi.png │ │ ├── chrome_Kd5yzW80tf_sq2oxp.png │ │ ├── chrome_LWjlxa5ZMT_t2jrr2.png │ │ ├── chrome_XdE6h2xaT8_ya58k6.png │ │ ├── chrome_Z1IwOcaATY_gxfn6k.png │ │ ├── chrome_csX5PLkZBq_h5hu0k.png │ │ ├── chrome_d3PsYXgOKK_weyqwy.png │ │ ├── chrome_e9ZIOvxldR_pbauzp.png │ │ ├── chrome_jtkwrZyAd4_zwp3qt.png │ │ ├── chrome_uLX3tDY65e_rlecxl.png │ │ ├── chrome_xQ16a4tU8v_etyuxh.png │ │ ├── chrome_z5Ib6JPWpR_ykdl3x.png │ │ ├── connect-block-ouput_nn5nx7.gif │ │ ├── connect-block2_slxrpv.gif │ │ ├── connect-block_advdve.gif │ │ ├── drop_in_a_block_zzrtaw.gif │ │ ├── run-workflow_da3vpy.gif │ │ └── selecting-blocks_vecdy3.gif │ │ └── wxpay.jpg ├── reference │ ├── condition-builder.md │ ├── javascript-execution-context.md │ ├── packages.md │ ├── storage.md │ └── workflow-common-errors.md └── workflow │ ├── blocks.md │ ├── debug-mode.md │ ├── element-selector.md │ ├── expressions.md │ ├── global-data.md │ ├── looping.md │ ├── overview.md │ ├── parameters.md │ ├── running-a-workflow.md │ ├── settings.md │ ├── sharing-workflow.md │ ├── table-or-variable.md │ ├── table.md │ ├── testing-mode.md │ └── variables.md ├── package.json ├── pnpm-lock.yaml └── tsconfig.json /.env: -------------------------------------------------------------------------------- 1 | SEARCH_API_KEY=208983b050565d57915e195a37717cea 2 | SEARCH_APP_ID=M1KB2X6PP3 3 | SEARCH_INDEX_NAME=automa -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | SEARCH_API_KEY= 2 | SEARCH_APP_ID= 3 | SEARCH_INDEX_NAME= -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public 3 | 4 | cache 5 | 6 | .temp 7 | .cache 8 | .DS_Store 9 | .eslintcache 10 | .env 11 | .env.local 12 | .env.development.local 13 | .env.test.local 14 | .env.production.local 15 | .history 16 | *.log 17 | 18 | .idea 19 | .vercel 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Automa中文文档 2 |

3 | Automa最新版本 4 | 5 | 在Twitter上关注我们 6 | 7 | 8 | 在Discord上与我们交流 9 | 10 |

11 | 12 | Automa是一个浏览器自动化的扩展。
13 | 自动填写表单、执行重复任务、截屏或抓取网站数据——选择权在您。您甚至可以设置自动化执行的时间! 14 | 15 | ## 下载 16 | 17 | 18 | 24 | 30 | 31 |
19 | 20 | Chrome网上应用店 21 |

Chrome网上应用店

22 |
23 |
25 | 26 | Firefox附加组件 27 |

Firefox附加组件

28 |
29 |
32 | 33 | ## 文档 34 | 浏览中文文档。[前往文档 »](https://automa.wiki) 35 | 36 | ## 交流 37 | 🐧QQ群:[949765697](https://qm.qq.com/cgi-bin/qm/qr?k=laiqREd2t3zTsT5iOrIL5Q9jdJo2thzW&jump_from=webapi&authKey=/Tjw4D6QjfdQEQ6Fwllt0K3DJelWp2DSffYQBs4TqWYkLtcLGxiSF2SV4OFdNeOG) 38 | 39 | ✈️Telegram: [@AutomaDev](https://t.me/AutomaDev) 40 | ## 捐赠 41 | 如果您对automa感到满意并愿意捐赠我们,可以通过下面二维码进行捐赠,感谢您的支持 42 | 43 |
44 |
45 | 46 |
支付宝
47 |
48 |
49 | 50 |
微信
51 |
52 |
53 | 54 | ## 贡献者 55 | 感谢所有提交问题,提出建议,并通常帮助使这个项目变得更好的每个人。 56 | 57 | 58 | 59 | 60 | 61 | ## 许可证 62 | 此存储库中的源代码根据GNU Affero通用公共许可证(AGPL)或[Automa商业许可证](https://www.automa.site/license/commercial/)进行了不同的授权。 63 | 64 | 详情见[LICENSE.txt](./LICENSE.txt)。 -------------------------------------------------------------------------------- /docs/.vitepress/config.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { defineConfig } from 'vitepress'; 3 | 4 | const links: { url: string; lastmod: number | undefined }[] = []; 5 | 6 | declare global { 7 | namespace NodeJS { 8 | interface ProcessEnv { 9 | SEARCH_API_KEY: string; 10 | SEARCH_APP_ID: string; 11 | SEARCH_INDEX_NAME: string; 12 | } 13 | } 14 | } 15 | 16 | const config = defineConfig({ 17 | lang: 'zh', 18 | title: 'Automa中文文档', 19 | description: 'Automa浏览器扩展文档', 20 | head: [ 21 | ['link', { rel: 'icon', type: 'image/x-icon', href: '/images/logo.png' }], 22 | ['script', {async: "", crossorigin: 'anonymous', src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4058130983777203'}] 23 | ], 24 | transformHtml: (_, id, { pageData }) => { 25 | if (!/[\\/]404\.html$/.test(id)) 26 | links.push({ 27 | url: pageData.relativePath.replace(/\.md$/, '.html'), 28 | lastmod: pageData.lastUpdated 29 | }) 30 | }, 31 | sitemap: { 32 | hostname: 'https://automa.wiki/', 33 | lastmodDateOnly: false 34 | }, 35 | locales: { 36 | root: { label: '简体中文' }, 37 | en: { label: 'English', link: 'https://docs.automa.site/' }, 38 | }, 39 | themeConfig: { 40 | nav: [ 41 | //{ text: 'Docs for v1.21.x or below', link: 'https://automa-docs-old.vercel.app/' }, 42 | { text: '扩展生成器', link: '/extension-builder/' } 43 | ], 44 | search: { 45 | provider: 'algolia', 46 | options: { 47 | apiKey: process.env.SEARCH_API_KEY, 48 | appId: process.env.SEARCH_APP_ID, 49 | indexName: process.env.SEARCH_INDEX_NAME, 50 | searchParameters: { 51 | //facetFilters: ['tags:cn'] 52 | }, 53 | placeholder: '搜索文档', 54 | translations: { 55 | button: { 56 | buttonText: '搜索' 57 | }, 58 | modal: { 59 | searchBox: { 60 | resetButtonTitle: '清除查询条件', 61 | resetButtonAriaLabel: '清除查询条件', 62 | cancelButtonText: '取消', 63 | cancelButtonAriaLabel: '取消' 64 | }, 65 | startScreen: { 66 | recentSearchesTitle: '搜索历史', 67 | noRecentSearchesText: '没有搜索历史', 68 | saveRecentSearchButtonTitle: '保存到搜索历史', 69 | removeRecentSearchButtonTitle: '从搜索历史中移除', 70 | favoriteSearchesTitle: '收藏', 71 | removeFavoriteSearchButtonTitle: '从收藏中移除' 72 | }, 73 | errorScreen: { 74 | titleText: '无法获取结果', 75 | helpText: '你可能需要检查你的网络连接' 76 | }, 77 | footer: { 78 | selectText: '选择', 79 | navigateText: '切换', 80 | closeText: '关闭', 81 | searchByText: '搜索供应商' 82 | }, 83 | noResultsScreen: { 84 | noResultsText: '无法找到相关结果', 85 | suggestedQueryText: '你可以尝试查询', 86 | reportMissingResultsText: '你认为这个查询应该有结果?', 87 | reportMissingResultsLinkText: '向我们反馈' 88 | } 89 | } 90 | }, 91 | } 92 | }, 93 | outline: { 94 | label: '本页目录', 95 | level: [2, 3], 96 | }, 97 | sidebar: { 98 | '/': [ 99 | { 100 | text: '入门', 101 | items: [ 102 | { text: '介绍', link: '/' }, 103 | { text: '快速开始', link: '/guide/quick-start' } 104 | ] 105 | }, 106 | { 107 | text: '工作流', 108 | collapsed: false, 109 | items: [ 110 | { text: '概述', link: '/workflow/overview' }, 111 | { text: '运行工作流', link: '/workflow/running-a-workflow' }, 112 | { text: '模块', link: '/workflow/blocks' }, 113 | { text: '共享工作流', link: '/workflow/sharing-workflow' }, 114 | { text: '全局数据', link: '/workflow/global-data' }, 115 | { text: '表', link: '/workflow/table' }, 116 | { text: '变量', link: '/workflow/variables' }, 117 | { text: '表格或变量', link: '/workflow/table-or-variable' }, 118 | { text: '参数', link: '/workflow/parameters' }, 119 | { text: '设置', link: '/workflow/settings' }, 120 | { text: '调试模式', link: '/workflow/debug-mode' }, 121 | { text: '元素选择器', link: '/workflow/element-selector' }, 122 | { text: '表达式', link: '/workflow/expressions' }, 123 | { text: '循环', link: '/workflow/looping' }, 124 | { text: '测试模式', link: '/workflow/testing-mode' }, 125 | ] 126 | }, 127 | { 128 | "text": "模块", 129 | "collapsed": true, 130 | "items": [ 131 | { 132 | "text": "常规", 133 | "items": [ 134 | { 135 | "text": "触发模块", 136 | "link": "/blocks/trigger.md" 137 | }, 138 | { 139 | "text": "执行工作流模块", 140 | "link": "/blocks/execute-workflow.md" 141 | }, 142 | { 143 | "text": "延迟模块", 144 | "link": "/blocks/delay.md" 145 | }, 146 | { 147 | "text": "导出数据模块", 148 | "link": "/blocks/export-data.md" 149 | }, 150 | { 151 | "text": "HTTP请求模块", 152 | "link": "/blocks/webhook.md" 153 | }, 154 | { 155 | "text": "模块组模块", 156 | "link": "/blocks/blocks-group.md" 157 | }, 158 | { 159 | "text": "剪贴板模块", 160 | "link": "/blocks/clipboard.md" 161 | }, 162 | { 163 | "text": "等待连接模块", 164 | "link": "/blocks/wait-connections.md" 165 | }, 166 | { 167 | "text": "通知模块", 168 | "link": "/blocks/notification.md" 169 | }, 170 | { 171 | "text": "工作流状态模块", 172 | "link": "/blocks/workflow-state.md" 173 | }, 174 | { 175 | "text": "参数提示模块", 176 | "link": "/blocks/parameter-prompt.md" 177 | } 178 | ] 179 | }, 180 | { 181 | "text": "浏览器", 182 | "items": [ 183 | { 184 | "text": "当前标签页模块", 185 | "link": "/blocks/active-tab.md" 186 | }, 187 | { 188 | "text": "新标签页模块", 189 | "link": "/blocks/new-tab.md" 190 | }, 191 | { 192 | "text": "切换标签页模块", 193 | "link": "/blocks/switch-tab.md" 194 | }, 195 | { 196 | "text": "新窗口模块", 197 | "link": "/blocks/new-window.md" 198 | }, 199 | { 200 | "text": "代理模块", 201 | "link": "/blocks/proxy.md" 202 | }, 203 | { 204 | "text": "后退模块", 205 | "link": "/blocks/go-back.md" 206 | }, 207 | { 208 | "text": "前进模块", 209 | "link": "/blocks/go-forward.md" 210 | }, 211 | { 212 | "text": "关闭标签/窗口模块", 213 | "link": "/blocks/close-tab.md" 214 | }, 215 | { 216 | "text": "截屏模块", 217 | "link": "/blocks/take-screenshot.md" 218 | }, 219 | { 220 | "text": "浏览器事件模块", 221 | "link": "/blocks/browser-event.md" 222 | }, 223 | { 224 | "text": "处理对话框模块", 225 | "link": "/blocks/handle-dialog.md" 226 | }, 227 | { 228 | "text": "处理下载模块", 229 | "link": "/blocks/handle-download.md" 230 | }, 231 | { 232 | "text": "刷新标签页模块", 233 | "link": "/blocks/reload-tab.md" 234 | }, 235 | { 236 | "text": "获取标签页链接模块", 237 | "link": "/blocks/tab-url.md" 238 | }, 239 | { 240 | "text": "Cookie模块", 241 | "link": "/blocks/cookie.md" 242 | } 243 | ] 244 | }, 245 | { 246 | "text": "网页交互", 247 | "items": [ 248 | { 249 | "text": "点击元素模块", 250 | "link": "/blocks/event-click.md" 251 | }, 252 | { 253 | "text": "获取文本模块", 254 | "link": "/blocks/get-text.md" 255 | }, 256 | { 257 | "text": "滚动元素模块", 258 | "link": "/blocks/element-scroll.md" 259 | }, 260 | { 261 | "text": "链接模块", 262 | "link": "/blocks/link.md" 263 | }, 264 | { 265 | "text": "属性值模块", 266 | "link": "/blocks/attribute-value.md" 267 | }, 268 | { 269 | "text": "表单模块", 270 | "link": "/blocks/forms.md" 271 | }, 272 | { 273 | "text": "Javascript代码模块", 274 | "link": "/blocks/javascript-code.md" 275 | }, 276 | { 277 | "text": "触发事件模块", 278 | "link": "/blocks/trigger-event.md" 279 | }, 280 | { 281 | "text": "切换框架模块", 282 | "link": "/blocks/switch-to.md" 283 | }, 284 | { 285 | "text": "上传文件模块", 286 | "link": "/blocks/upload-file.md" 287 | }, 288 | { 289 | "text": "鼠标悬停元素模块", 290 | "link": "/blocks/hover-element.md" 291 | }, 292 | { 293 | "text": "保存资源模块", 294 | "link": "/blocks/save-assets.md" 295 | }, 296 | { 297 | "text": "按键模块", 298 | "link": "/blocks/press-key.md" 299 | }, 300 | { 301 | "text": "创建元素模块", 302 | "link": "/blocks/create-element.md" 303 | } 304 | ] 305 | }, 306 | { 307 | "text": "控制流", 308 | "items": [ 309 | { 310 | "text": "重复任务模块", 311 | "link": "/blocks/repeat-task.md" 312 | }, 313 | { 314 | "text": "条件模块", 315 | "link": "/blocks/conditions.md" 316 | }, 317 | { 318 | "text": "元素存在模块", 319 | "link": "/blocks/element-exists.md" 320 | }, 321 | { 322 | "text": "循环模块", 323 | "link": "/blocks/while-loop.md" 324 | }, 325 | { 326 | "text": "循环数据模块", 327 | "link": "/blocks/loop-data.md" 328 | }, 329 | { 330 | "text": "循环元素模块", 331 | "link": "/blocks/loop-elements.md" 332 | }, 333 | { 334 | "text": "循环断点模块", 335 | "link": "/blocks/loop-breakpoint.md" 336 | } 337 | ] 338 | }, 339 | { 340 | "text": "在线服务", 341 | "items": [ 342 | { 343 | "text": "Google Sheets模块", 344 | "link": "/blocks/google-sheets.md" 345 | }, 346 | { 347 | "text": "Google Sheets (GDrive)模块", 348 | "link": "/blocks/google-sheets-drive.md" 349 | }, 350 | { 351 | "text": "Google Drive模块", 352 | "link": "/blocks/google-drive.md" 353 | } 354 | ] 355 | }, 356 | { 357 | "text": "数据", 358 | "items": [ 359 | { 360 | "text": "插入数据模块", 361 | "link": "/blocks/insert-data.md" 362 | }, 363 | { 364 | "text": "删除数据模块", 365 | "link": "/blocks/delete-data.md" 366 | }, 367 | { 368 | "text": "获取日志数据模块", 369 | "link": "/blocks/log-data.md" 370 | }, 371 | { 372 | "text": "切分变量模块", 373 | "link": "/blocks/slice-variable.md" 374 | }, 375 | { 376 | "text": "增加变量模块", 377 | "link": "/blocks/increase-variable.md" 378 | }, 379 | { 380 | "text": "正则表达式变量模块", 381 | "link": "/blocks/regex-variable.md" 382 | }, 383 | { 384 | "text": "数据映射模块", 385 | "link": "/blocks/data-mapping.md" 386 | }, 387 | { 388 | "text": "排序数据模块", 389 | "link": "/blocks/sort-data.md" 390 | } 391 | ] 392 | } 393 | ] 394 | }, 395 | { 396 | text: '参考', 397 | collapsed: false, 398 | items: [ 399 | { text: '储存', link: '/reference/storage' }, 400 | { text: '包(Package)', link: '/reference/packages' }, 401 | { text: '条件生成器', link: '/reference/condition-builder' }, 402 | { text: '常见错误', link: '/reference/workflow-common-errors' }, 403 | { text: 'JavaScript执行上下文', link: '/reference/javascript-execution-context' } 404 | ], 405 | }, 406 | { 407 | text: '集成', 408 | collapsed: false, 409 | items: [ 410 | { text: 'Google Drive', link: '/integrations/google-drive' }, 411 | ] 412 | } 413 | ], 414 | '/extension-builder/': [ 415 | { 416 | text: '入门', 417 | items: [ 418 | { text: '概述和快速入门', link: '/extension-builder/' } 419 | ], 420 | }, 421 | { 422 | text: '扩展', 423 | items: [ 424 | { text: '面板', link: '/extension-builder/dashboard' }, 425 | { text: '工作流', link: '/extension-builder/workflows' }, 426 | { text: '定制', link: '/extension-builder/customize' }, 427 | { text: '崩溃日志', link: '/extension-builder/crash-logs' }, 428 | ], 429 | }, 430 | { 431 | text: '构建扩展', 432 | items: [ 433 | { text: '全局变量', link: '/extension-builder/global-variables' }, 434 | { text: '版本控制', link: '/extension-builder/version-control' }, 435 | { text: '安装扩展', link: '/extension-builder/installing-extension' }, 436 | ] 437 | } 438 | ] 439 | }, 440 | editLink: { 441 | pattern: 'https://github.com/automa-wiki/docs/edit/main/docs/:path', 442 | text: '为此页提供修改建议' 443 | }, 444 | logo: '/images/logo.png', 445 | lastUpdated: { 446 | text: '最后更新' 447 | }, 448 | socialLinks: [ 449 | { icon: 'github', link: 'https://github.com/automa-wiki/docs' } 450 | ], 451 | }, 452 | }); 453 | 454 | export default config 455 | -------------------------------------------------------------------------------- /docs/.vitepress/lib/vRemixicon.ts: -------------------------------------------------------------------------------- 1 | import vRemixicon from 'v-remixicon'; 2 | import { 3 | riTable2, 4 | riBug2Line, 5 | riPlayLine, 6 | riMore2Line, 7 | riFocus3Line, 8 | riArrowLeftSLine, 9 | riRecordCircleLine, 10 | } from 'v-remixicon/icons'; 11 | 12 | export const icons = { 13 | riTable2, 14 | riBug2Line, 15 | riPlayLine, 16 | riMore2Line, 17 | riFocus3Line, 18 | riArrowLeftSLine, 19 | riRecordCircleLine, 20 | }; 21 | 22 | export default vRemixicon; -------------------------------------------------------------------------------- /docs/.vitepress/theme/CustomLayout.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/CustomNotFound.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/custom.css: -------------------------------------------------------------------------------- 1 | svg.v-remixicon { 2 | display: inline-block; 3 | vertical-align: middle; 4 | } 5 | 6 | img { 7 | border-radius: 4px; 8 | } -------------------------------------------------------------------------------- /docs/.vitepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | import DefaultTheme from 'vitepress/theme'; 2 | import CustomLayout from './CustomLayout.vue'; 3 | import CustomNotFound from './CustomNotFound.vue'; 4 | import vRemixicon, { icons } from '../lib/vRemixicon'; 5 | import './custom.css'; 6 | 7 | export default { 8 | ...DefaultTheme, 9 | Layout: CustomLayout, 10 | NotFound: CustomNotFound, 11 | enhanceApp({ app }) { 12 | app.use(vRemixicon, icons); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/redirectRoutes.ts: -------------------------------------------------------------------------------- 1 | import { Router } from 'vitepress'; 2 | 3 | export const redirectRoutes = [ 4 | { from: '/guide/host-workflow.html', to: '/workflow/sharing-workflow.html#host-workflow' }, 5 | { from: '/guide/element-selector.html', to: '/workflow/element-selector.html' }, 6 | { from: '/guide/packages.html', to: '/reference/packages.html' }, 7 | { from: '/guide/storage.html', to: '/reference/storage.html' }, 8 | { from: '/guide/workflow-errors.html', to: '/reference/workflow-common-errors.html' }, 9 | { from: '/api-reference/element-selector.html', to: '/workflow/element-selector.html' }, 10 | { from: '/api-reference/global-data.html', to: '/workflow/global-data.html' }, 11 | { from: '/api-reference/table-or-variables.html', to: '/workflow/table-or-variable.html' }, 12 | { from: '/api-reference/table.html', to: '/workflow/table.html' }, 13 | { from: '/api-reference/variables.html', to: '/workflow/variables.html' }, 14 | ]; 15 | 16 | export function watchRedirectRoutes(path: string, router: Router) { 17 | const redirectPath = redirectRoutes.find((item) => path.includes(item.from)); 18 | if (!redirectPath) return; 19 | 20 | router.go(redirectPath.to); 21 | } -------------------------------------------------------------------------------- /docs/blocks/active-tab.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 活动标签页模块 3 | --- 4 | 5 | # 活动标签页模块 6 | 7 | 将您所在的当前标签页设置为活动标签页。在这里,“活动标签页”是指那些需要使用标签页的模块将会执行操作的标签页,比如截图模块。 8 | 9 | 例如,当你想要对你正在浏览的网站进行截图或执行JavaScript代码时,你可以先使用活动标签页模块,然后再连接其他模块,如[截图模块](/blocks/take-screenshot.md)或[JavaScript代码模块](/blocks/javascript-code.md)。 10 | 11 | ![活动标签页示例](/images/blocks/chrome_J5wCfHbV0k_cadz80.png) 12 | -------------------------------------------------------------------------------- /docs/blocks/attribute-value.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 属性值模块 3 | --- 4 | 5 | # 属性值模块 6 | 7 | 从元素中获取指定属性的值。 8 | 9 | - **元素选择器**
10 | [元素选择器](../workflow/element-selector.md)。 11 | 12 | - **属性名称**
13 | 需要检索的属性名称。 14 | 15 | - **分配给变量**
16 | 是否将值分配给一个[变量](../workflow/variables.md)。 17 | 18 | - **变量名称**
19 | 分配值的变量的名称。 20 | 21 | - **插入到表格**
22 | 是否将值插入到[表格](../workflow/table.md)中。 23 | 24 | - **选择列**
25 | 将值插入的列。 26 | 27 | - **添加额外行**
28 | 在[表格](../workflow/table.md)中插入额外的行。 29 | 30 | ## 查找元素属性名称 31 | 32 | 要查找属性名称,您可以使用[Automa 元素选择器](../workflow/element-selector.md#generating-selector)。首先需要选择一个元素,然后您可以在它下面找到该元素所拥有的属性列表。 33 | 34 | ![Attributes](/images/blocks/chrome_yUjnbDYYP7_hm4bwq.png) 35 | 36 | -------------------------------------------------------------------------------- /docs/blocks/blocks-group.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 模块组 3 | --- 4 | 5 | # 模块组 6 | 7 | 将其他模块组合在一个容器内,这样可以使工作流看起来更加有条理。 8 | 9 | 模块组内的模块将根据从上到下的模块顺序依次执行。 10 | 11 | ![Group](/images/blocks/chrome_wH5Q79djOe_wlbudv.png) 12 | -------------------------------------------------------------------------------- /docs/blocks/browser-event.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 浏览器事件模块 3 | --- 4 | 5 | # 浏览器事件模块 6 | 7 | 等待选定的事件被触发后,再执行下一个模块。 8 | 9 | - **超时(毫秒)**
10 | 设置工作流等待选定事件被触发的时间长度,默认值是10000毫秒(10秒)。一旦达到超时时间,工作流将继续执行模块。 11 | 12 | - **事件**
13 | 工作流需要等待的事件。 14 | 15 | - **标签页关闭**
16 | 等待一个标签页被关闭。 17 | 18 | - **标签页加载**
19 | 等待活动标签页或者匹配[匹配模式](https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/Match_patterns#examples)的标签页加载完毕。 20 | 21 | - **标签页/窗口创建**
22 | 等待一个标签页或窗口被创建。 23 | 24 | - **过滤器**
25 | 过滤新创建的标签页/窗口的URL。如果URL匹配你输入的URL或者正则表达式,工作流将继续执行模块。 26 | 27 | - **活动标签页**
28 | 将创建的标签页/窗口设置为活动标签页。 29 | 30 | - **窗口关闭**
31 | 等待一个窗口被关闭。 32 | -------------------------------------------------------------------------------- /docs/blocks/clipboard.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 剪贴板模块 3 | --- 4 | 5 | # 剪贴板模块 6 | 7 | 从剪贴板获取复制的文本。 8 | 9 | - **获取剪贴板数据**:从剪贴板检索数据 10 | - **分配到变量**
11 | 是否将值分配到[变量](../workflow/variables.md)中。 12 | 13 | - **变量名称**
14 | 指定要分配值的变量的名称。 15 | 16 | - **插入到表格**
17 | 是否将值插入到[表格](../workflow/table.md)中。 18 | 19 | - **选择列**
20 | 将值插入到哪一列。 21 | 22 | - **插入文本到剪贴板**:向剪贴板插入文本 23 | - **文本**
24 | 要插入到剪贴板的文本 25 | - **复制页面上选定的文本** -------------------------------------------------------------------------------- /docs/blocks/close-tab.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 关闭标签/窗口模块 3 | --- 4 | 5 | # 关闭标签/窗口模块 6 | 7 | 关闭标签页或窗口。 8 | 9 | - **关闭活动标签页**
10 | 关闭 Automa 正在使用的标签页。 11 | - **URL**
12 | 你想关闭标签页的 URL 或者[匹配模式](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns#examples)。例如:`http://example.org/` 或 `*://*.example.org/*`。 -------------------------------------------------------------------------------- /docs/blocks/conditions.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 条件模块 3 | --- 4 | 5 | # 条件模块 6 | 7 | 向工作流添加条件逻辑。 8 | 9 | 当这个模块执行时,它会检查你构建的每个条件。如果匹配到条件,工作流会继续执行与条件输出相连的模块。如果没有匹配,工作流将会继续执行与`fallback`输出相连的模块。 10 | 11 | 打开[条件构建器](../reference/condition-builder.md)页面查看如何构建条件。 -------------------------------------------------------------------------------- /docs/blocks/cookie.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cookie模块 3 | --- 4 | 5 | # Cookie模块 6 | 7 | 获取、设置或删除cookies。 8 | 9 | - **获取cookie**
10 | - **获取所有cookies**
11 | 选择是检索一个或所有cookies。 12 | 13 | - **URL**
14 | 与要检索的cookie关联的URL。当你启用"获取所有cookies"时,这个字段是可选的。 15 | 16 | - **名称**
17 | 要检索的cookies的名称 18 | 19 | - **路径**
20 | cookies的路径 21 | 22 | - **域名**
23 | cookies必须与之关联的域名(要么与这个确切的域名关联,要么与它的一个子域名关联) 24 | 25 | - **设置cookie**
26 | - **URL**
27 | 表示与cookie关联的请求-URI。这个值可以影响创建的cookie的默认域和路径值。 28 | 29 | - **名称**
30 | cookie的名称 31 | 32 | - **路径**
33 | cookies的路径 34 | 35 | - **值**
36 | cookies的值 37 | 38 | - **域名**
39 | 表示cookie的域名 40 | 41 | - **sameSite**
42 | 表示cookie的SameSite状态的值。可能的值有`lax`、`strict`,或你可以留空。 43 | 44 | - **过期日期**
45 | 以秒数表示的cookie的过期日期 46 | 47 | - **删除cookies**
48 | - **URL**
49 | 与cookie关联的URL表示 50 | 51 | - **名称**
52 | 要删除的cookies的名称 53 | -------------------------------------------------------------------------------- /docs/blocks/create-element.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 创建元素模块 3 | --- 4 | 5 | # 创建元素模块 6 | 7 | 创建一个元素并将其插入到页面中。 8 | 9 | - **元素选择器**
10 | 针对目标元素的[元素选择器](../workflow/element-selector.md)。 11 | 12 | - **插入元素**
13 | 表示相对于目标元素的位置。 14 | - **作为第一个子元素**
15 | 将它插入为目标元素的第一个子元素。 16 | 17 | - **作为最后一个子元素**
18 | 将它插入为目标元素的最后一个子元素。 19 | 20 | - **作为前一个同级元素**
21 | 将它插入为目标元素的前一个同级元素。 22 | 23 | - **作为后一个同级元素**
24 | 将它插入为目标元素的后一个同级元素。 25 | 26 | - **替换目标元素**
27 | 用所创建的元素替换目标元素。 28 | 29 | - **HTML**
30 | 您要创建的元素的HTML 31 | 32 | - **CSS**
33 | 将被注入页面的CSS 34 | 35 | - **JavaScript**
36 | 将被注入页面的JavaScript 37 | - **`automaRefData(keyword, path?)` 函数**
38 | 使用此函数来[引用数据](../workflow/expressions.md)。
39 | 更多详情请打开[JavaScript模块页面](/blocks/javascript-code.html#automarefdata-keyword-path) 40 | 41 | - **`automaExecWorkflow(detail)` 函数**
42 | 用于执行工作流的函数。
43 | `detail` 参数是您输入工作流详情的地方,比如工作流的id或者您想要执行的工作流的`publicId`。例如, 44 | ```js 45 | // 根据其id执行工作流 46 | automaExecWorkflow({ id: 'workflow-id' }); 47 | 48 | // 根据其publicId执行工作流 49 | automaExecWorkflow({ publicId: 'workflow-public-id' }); 50 | ``` 51 | 您还可以输入变量,这些变量将在工作流运行时被注入。 52 | ```js 53 | automaExecWorkflow({ 54 | id: 'workflow-id', 55 | data: { 56 | variables: { 57 | varA: '变量A的值', 58 | postCode: 1212, 59 | numbers: [1, 2, 3, 4], 60 | } 61 | } 62 | }) 63 | ``` 64 | - **预加载脚本**
65 | 在注入元素之前加载脚本或样式。 66 | 67 | -------------------------------------------------------------------------------- /docs/blocks/data-mapping.md: -------------------------------------------------------------------------------- 1 | --- 2 | 标题:数据映射模块 3 | --- 4 | 5 | # 数据映射模块 6 | 7 | 映射变量或表中的数据。 8 | 9 | - **数据源**
10 | 数据映射的源头可以是一个变量或表。 11 | 12 | - **数据映射**
13 | 数据映射是您通过输入点标记匹配源字段与目标字段的地方。一个源可以映射多个目标。例如,当您有如下数据 14 | ```json 15 | [ 16 | { 17 | "address": "2204 Volutpat Rd.", 18 | "name": "Palmer Porter", 19 | "phone": "(251) 595-5203", 20 | "email": "phasellus.dolor@aol.org", 21 | "postalZip": "8517", 22 | "country": "United States" 23 | }, 24 | { 25 | "address": "2741 Dis Rd.", 26 | "name": "Byron Bowers", 27 | "phone": "(563) 717-9312", 28 | "email": "mattis.ornare@outlook.couk", 29 | "postalZip": "5612", 30 | "country": "Costa Rica" 31 | }, 32 | { 33 | "address": "Ap #923-7718 Sed Rd.", 34 | "name": "Joseph Waller", 35 | "phone": "1-897-102-6811", 36 | "email": "cras.pellentesque@outlook.edu", 37 | "postalZip": "38-251", 38 | "country": "Belgium" 39 | } 40 | ] 41 | ``` 42 | 并有一个像这样的数据映射。 43 | 44 | ![数据映射](/images/blocks/Screenshot_2022-07-06_134530_pyuvbm.png) 45 | 46 | 数据将转换为 47 | ```json 48 | [ 49 | { 50 | "email": "phasellus.dolor@aol.org", 51 | "full_name": "Palmer Porter", 52 | "address": { 53 | "street": "2204 Volutpat Rd.", 54 | "postalZip": "8517", 55 | "country": "United States" 56 | }, 57 | }, 58 | { 59 | "email": "mattis.ornare@outlook.couk", 60 | "full_name": "Byron Bowers", 61 | "address": { 62 | "street": "2741 Dis Rd.", 63 | "postalZip": "5612", 64 | "country": "Costa Rica" 65 | }, 66 | }, 67 | { 68 | "email": "cras.pellentesque@outlook.edu", 69 | "full_name": "Joseph Waller", 70 | "address": { 71 | "street": "Ap #923-7718 Sed Rd.", 72 | "postalZip": "38-251", 73 | "country": "Belgium" 74 | } 75 | } 76 | ] 77 | ``` 78 | 79 | - **指派给变量**
80 | 是否将映射后的数据指派给一个[变量](../workflow/variables.md)。 81 | 82 | - **变量名**
83 | 要指派映射数据的变量名。 84 | 85 | - **插入表格**
86 | 是否将映射的数据插入到[表](../workflow/table.md)中。 87 | 88 | - **选择列**
89 | 将映射数据插入的列。 -------------------------------------------------------------------------------- /docs/blocks/delay.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 延迟块 3 | --- 4 | 5 | # 延迟块 6 | 7 | 在执行下一个块之前添加延迟(以毫秒为单位)。 -------------------------------------------------------------------------------- /docs/blocks/delete-data.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 删除数据模块 3 | --- 4 | 5 | # 删除数据模块 6 | 删除表格或变量数据 7 | 8 | - **来源数据**
9 | 选择要删除的数据 10 | 11 | - **选择列**
12 | 删除所有列或只删除特定的列。 13 | 14 | - **变量**
15 | 您想要删除的变量名称 -------------------------------------------------------------------------------- /docs/blocks/element-exists.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 元素存在模块 3 | --- 4 | 5 | # 元素存在模块 6 | 7 | 检查一个[元素](https://developer.mozilla.org/en-US/docs/Web/API/Element)是否存在于[文档](https://developer.mozilla.org/en-US/docs/Web/API/Document)中。 8 | 9 | 如果元素存在,工作流将执行连接到第一个输出的模块。如果不存在,它将执行`fallback`输出。 10 | 11 | - **元素选择器**
12 | [元素选择器](../workflow/element-selector.md)。 13 | 14 | - **尝试次数**
15 | 根据选择器定义检查元素的次数。 16 | 17 | - **超时**
18 | 尝试之间的延迟,默认为500毫秒。 19 | 20 | - **备选方案**
21 | 当元素不存在时的备选方案。 22 | 23 | - **如果不存在则抛出错误**
24 | 如果不存在元素,抛出错误而不是执行备选方案。 -------------------------------------------------------------------------------- /docs/blocks/element-scroll.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 滚动元素模块 3 | --- 4 | 5 | # 滚动元素模块 6 | 7 | 将元素滚动到特定的坐标集。 8 | 9 | - **元素选择器**
10 | [元素选择器](../workflow/element-selector.md)。 11 | 12 | - **水平滚动**
13 | 您希望显示的元素的 X 坐标。 14 | 15 | - **垂直滚动**
16 | 您希望显示的元素的 Y 坐标。 17 | 18 | - **滚动到视图中**
19 | 滚动直到匹配的元素在浏览器窗口中可见。 20 | 21 | - **滚动到视图中**
22 | 滚动匹配元素的父元素,直到匹配的元素对用户可见。 23 | 24 | - **增加水平滚动**
25 | 将匹配元素的 X 滚动坐标与您输入的水平滚动相加。 26 | 27 | - **增加垂直滚动**
28 | 将匹配元素的 Y 滚动坐标与您输入的垂直滚动相加。 29 | 30 | -------------------------------------------------------------------------------- /docs/blocks/event-click.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 点击元素模块 3 | --- 4 | 5 | # 点击元素模块 6 | 7 | 模拟在一个元素上进行鼠标点击。 8 | 9 | - **元素选择器**
10 | 点击的元素的[选择器](../workflow/element-selector.md)。 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/blocks/execute-workflow.md: -------------------------------------------------------------------------------- 1 | --- 2 | 标题:执行工作流模块 3 | --- 4 | 5 | # 执行工作流模块 6 | 7 | 执行另一个工作流。 8 | 9 | ## 选择工作流 10 | 选择要执行的工作流。 11 | 12 | ## 全局数据 13 | 覆盖选定工作流的[全局数据](../workflow/global-data.md)。 14 | 15 | ## 执行ID 16 | 当您在[表达式](../workflow/expressions.md)中需要访问已执行的工作流时,用以标识的ID。已执行工作流将返回其[表](../workflow/table.md)和[变量](../workflow/variables.md)。例如, 17 | ``` 18 | {{ workflow.executeId.table }} 19 | ``` 20 | 把`executeId`换成您输入的ID。 21 | 22 | ## 插入所有当前工作流变量 23 | 将当前工作流的所有变量插入到将要执行的工作流中。 24 | 25 | ## 插入当前工作流变量 26 | 将当前工作流的特定变量插入到将要执行的工作流中。使用逗号分隔变量名称。 -------------------------------------------------------------------------------- /docs/blocks/export-data.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 导出数据模块 3 | --- 4 | 5 | # 导出数据模块 6 | 7 | 导出[表](../workflow/table.md)、[谷歌表格](./google-sheets.md)或[变量](../workflow/variables.md)数据到 JSON、CSV 或纯文本文件。 8 | 9 | ## 文件名 10 | 文件的名称 11 | 12 | ## 参考键 13 | 在谷歌表格模块中输入的[参考键](./google-sheets.html#reference-key)。 14 | 15 | ## 变量名称 16 | 你想要导出的变量名称。 -------------------------------------------------------------------------------- /docs/blocks/forms.md: -------------------------------------------------------------------------------- 1 | --- 2 | 标题:表单模块 3 | --- 4 | 5 | # 表单模块 6 | 7 | 获取或填充表单元素(输入框、选择框、复选框和单选框)的值。 8 | 9 | - **元素选择器**
10 | [元素选择器](../workflow/element-selector.md)。 11 | 12 | ## 获取表单值 13 | 获取表单元素的值。 14 | 15 | - **分配至变量**
16 | 是否将值分配到[变量](../workflow/variables.md)中。 17 | 18 | - **变量名称**
19 | 分配值的变量名。 20 | 21 | - **插入至表**
22 | 是否将值插入到[表](../workflow/table.md)中。 23 | 24 | - **选择列**
25 | 将值插入到哪一列中。 26 | 27 | 28 | ## 表单类型 29 | 30 | ### 文本字段 31 | 32 | - **值**
33 | 文本字段元素,如 \ 和 \