miniprogram-automator

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

    Keywords

    none

    Install

    npm i miniprogram-automator

    DownloadsWeekly Downloads

    293

    Version

    0.11.0

    License

    MIT

    Unpacked Size

    31.2 kB

    Total Files

    22

    Last publish

    Collaborators

    • wechat-miniprogram