npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

miniprogram-automator

0.5.6 • 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

74

version

0.5.6

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability