html52.com
我爱小程序-开发者交流社区

miniprogram-automator自动化测试工具怎么自动输入文字到input框?

 miniprogram-automator自动化测试工具怎么自动输入文字到input框?
目前能获取到input的值但是设置不了,我是用taro框架写的小程序,照道理来说能获取到应该就能设置才对的。

const automator = require('miniprogram-automator');
 
automator.connect({
  wsEndpoint: 'ws://localhost:9420',
}).then(async miniProgram => {
  // 从首页重启
  const page = await miniProgram.reLaunch('/pages/index/index')
  const joinBtn = await page.$$('.index__card')
  await joinBtn[0].tap()//加入会议页面
  let enterPage = await miniProgram.reLaunch('/pages/joinConference/index')
  const inputInput = await enterPage.$$('input')
  await inputInput[0].tap()
 
  console.log(await inputInput[0])
  console.log(await inputInput[1].value())
   
  // await element[1].tap()//个人中心
}).catch(e => {
  console.log('catch a error', e);
});

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付