miniprogram-automator
TypeScript icon, indicating that this package has built-in type declarations

0.12.1 • Public • Published

小程序自动化

小程序自动化 JS 版 SDK。

安装

npm i miniprogram-automator

使用

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()
})()

Dependents (14)

Package Sidebar

Install

npm i miniprogram-automator

Weekly Downloads

286

Version

0.12.1

License

MIT

Unpacked Size

34.9 kB

Total Files

22

Last publish

Collaborators

  • wechat-miniprogram