# miniprogram-automator

> 小程序自动化 JS 版 SDK。

Latest version **0.12.1** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install miniprogram-automator
pnpm add miniprogram-automator
yarn add miniprogram-automator
bun add miniprogram-automator
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.12.1 |
| Published | 2023-11-07 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 34.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | redhoodsu |
| Maintainers | wechat-miniprogram |

## Links

- npm: https://www.npmjs.com/package/miniprogram-automator
- Repository: git@git.code.oa.com:devtools/automator
- npm.io page: https://npm.io/package/miniprogram-automator

## Dependencies (6)

- [ws](https://npm.io/package/ws.md) ^6.1.3
- [jimp](https://npm.io/package/jimp.md) ^0.6.4
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [licia](https://npm.io/package/licia.md) ^1.4.4
- [qrcode-reader](https://npm.io/package/qrcode-reader.md) ^1.0.4
- [qrcode-terminal](https://npm.io/package/qrcode-terminal.md) ^0.12.0

## Recent versions

- 0.12.1 (latest) — 2023-11-07
- 0.12.0-beta.1 (beta) — 2021-12-06
- 0.12.0 — 2022-09-28
- 0.11.0 — 2021-09-14
- 0.10.0 — 2020-07-20
- 0.9.1 — 2020-01-03
- 0.9.0 — 2019-12-31
- 0.8.0 — 2019-10-29
- 0.7.0 — 2019-10-24
- 0.6.0 — 2019-10-21
- 0.5.9 — 2019-09-12
- 0.5.8 — 2019-08-02
- 0.5.7 — 2019-07-22
- 0.5.6 — 2019-07-16
- 0.5.5 — 2019-07-15
- … 5 more at https://npm.io/package/miniprogram-automator/versions

## README

# 小程序自动化

小程序自动化 JS 版 SDK。

## 安装

```bash
npm i miniprogram-automator
```

## 使用

```javascript
const automator = require('miniprogram-automator')

;(async () => {
  const miniProgram = await automator.launch({
    cliPath: 'path/to/cli',
    projectPath: 'path/to/project',
  })

  const page = await miniProgram.reLaunch('/page/component/index')
  await page.waitFor(500)
  const element = await page.$('.kind-list-item-hd')
  console.log(await element.attribute('class'))
  await element.tap()
  await page.waitFor(200)
  console.log(await element.attribute('class'))

  await miniProgram.close()
})()
```

---
_Source: https://npm.io/package/miniprogram-automator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
