当前位置: 首页 > news >正文

网站怎么做兼容测试域名ip查询

网站怎么做兼容测试,域名ip查询,鄂尔多斯市住房和城乡建设厅网站,网架公司招聘信息如果你有很多手机,然后需要在这些手机上同时执行相同的操作,这个时候如果能有一种办法批量操作,将会大大提高效率,节省很多时间。本文将介绍基于uiautomator2实现的群控手机方案。 uiautomator2 是 一种 Android 自动化测试框架&…

如果你有很多手机,然后需要在这些手机上同时执行相同的操作,这个时候如果能有一种办法批量操作,将会大大提高效率,节省很多时间。本文将介绍基于uiautomator2实现的群控手机方案。

uiautomator2 是 一种 Android 自动化测试框架,提供了点击、长按、输入文本、滑动、拖拽、截屏等方法,能够模拟用户的各种动作。

本方案采用python的web端框架django+vue前端框架实现,支持在页面选择手机,执行配置的命令,多部手机会同时执行操作(页面做的比较简陋,见谅)。

大致的流程也比较简单,基于在页面配置的命令,调用uiautomator2的相关api实现,有兴趣的朋友也可以了解下uiautomator2相关的接口,动手来实现一遍

这里贴上前端的实现代码

<template><div class="common-layout"><el-container><el-header><div style="font-weight: bolder;text-align: center;font-size: 30px">手机群控</div></el-header><el-main><el-row><el-col :span="12"><el-card class="box-card"><div style="display: flex;justify-content: space-between;align-items:center"><div style="font-weight: bolder;">设备列表</div><el-button link type="text" @click="getDeviceList">刷新</el-button></div><el-table :data="deviceListData" style="width: 100%;" height="75vh" @selection-change="selectDevices" ref="deviceTable"><el-table-column type="selection" width="55"/><el-table-column prop="sn" label="设备编号"/><el-table-column prop="name" label="设备名称"/><el-table-column prop="status" label="状态"/><el-table-column label="操作"><template slot-scope="scope"><el-button link type="text" size="small" @click="editDevice(scope.row)">编辑</el-button><!--<el-button link type="primary" size="small">删除</el-button>--></template></el-table-column></el-table></el-card></el-col><el-col :span="12"><el-card class="box-card"><div style="display: flex;justify-content: space-between;align-items:center"><div style="font-weight: bolder;">命令列表</div><el-button link type="text" @click="addCommandVisible = true">添加</el-button></div><el-table :data="commandListData" style="width: 100%" height="75vh" ><el-table-column width="55"/><el-table-column prop="name" label="名称"/><el-table-column prop="creatTime" label="创建时间"/><el-table-column label="操作"><template slot-scope="scope"><el-button link type="primary" size="small" @click="updateCommand(scope.row)">编辑</el-button><el-button link type="primary" size="small" @click="deleteCommand(scope.row.name)">删除</el-button><el-button link type="primary" size="small" @click="executeCommand(scope.row.name)">执行</el-button></template></el-table-column></el-table></el-card></el-col></el-row></el-main></el-container><el-dialog :visible.sync="addCommandVisible" title="添加/编辑命令"><el-input v-model="commandInfo.name" autocomplete="off" placeholder="请输入命令名称"></el-input><el-table :row-class-name="tableRowClassName" :data="commandInfo.commands" border style="width: 100%"><el-table-column align="center" width="100px" type="index" label="序号"></el-table-column><el-table-column align="center" prop="operation" label="操作"><template slot-scope="scope"><el-select @change="operationChange(scope.row.operation,scope.row.index)" size="small"v-model="scope.row.operation" placeholder="请选择操作类型"><el-option v-for="item in operationOption" :key="item.value" :label="item.label":value="item.value"></el-option></el-select></template></el-table-column><el-table-column align="center" prop="param" label="参数"><template #default="scope"><el-input size="small" v-model="scope.row.param" placeholder="非必填,有则填写"></el-input></template></el-table-column><el-table-column align="center" prop="delayTime" label="延时"><template #default="scope"><el-input size="small" v-model="scope.row.delayTime" placeholder="填写延时时长,单位秒"></el-input></template></el-table-column><el-table-column align="center" prop="date" label="操作"><template slot-scope="scope"><el-button link type="primary" size="small" @click="addForm">添加</el-button><el-button link type="primary" size="small" v-if="commandInfo.commands.length>1"@click="removeIdx(scope.row,scope.row.index)" style="color:rgb(216,30,6)">删除</el-button></template></el-table-column></el-table><template #footer><span class="dialog-footer"><el-button @click="addCommandVisible = false">取消</el-button><el-button type="primary" @click="addCommand">确定</el-button></span></template></el-dialog><el-dialog title="编辑设备" :visible.sync="updateDeviceVisible"><el-form :model="deviceInfo"><el-form-item label="设备编号" :label-width="formLabelWidth"><el-input v-model="deviceInfo.sn" autocomplete="off" disabled></el-input></el-form-item><el-form-item label="设备名称" :label-width="formLabelWidth"><el-input v-model="deviceInfo.name" autocomplete="off"></el-input></el-form-item></el-form><div slot="footer" class="dialog-footer"><el-button @click="updateDeviceVisible = false">取 消</el-button><el-button type="primary" @click="updateDevice">确 定</el-button></div></el-dialog></div>
</template>
<script>import {getDeviceList, updateDevice,getCommandList,addCommand,deleteCommand,executeCommand} from '@/api/device'export default {name: 'device',data() {return {formLabelWidth: '140px',addCommandVisible: false,commandInfo: {name:"",commands: [{operation: '',param: '',delayTime: ''}]},operationOption: [{value: '单击',label: '单击'},{value: '返回',label: '返回'},{value: '右滑',label: '右滑'},{value: '截屏',label: '截屏'},{value: '点击Home键',label: '点击Home键'},{value: '卸载',label: '卸载'},{value: '输入文字',label: '输入文字'},{value: '左滑',label: '左滑'}],deviceListData: [],commandListData: [],deviceInfo: {sn: "",name: ""},executeParam:{devices:[],name:""},updateDeviceVisible:false,}},mounted() {this.getDeviceList()this.getCommandList()},methods: {selectDevices(val) {let selection = this.$refs.deviceTable.selection;this.executeParam.devices = []for (let item of selection){this.executeParam.devices.push(item.sn)}console.log(JSON.stringify(this.executeParam.devices))},getDeviceList() {getDeviceList().then(res => {if (res.code === 0) {this.deviceListData = res.data;} else {this.$message.error('查询失败!')}this.loading = false}).catch(err => {this.loading = falsethis.$message.error(err)})},operationChange(operation, index) {this.commandInfo.commands[index].operation = operation},editDevice(data){this.deviceInfo = datathis.updateDeviceVisible = true;},updateDevice() {updateDevice(this.deviceInfo).then(res => {if (res.code === 0) {this.getDeviceList()} else {this.$message.error('查询失败!')}this.loading = falsethis.updateDeviceVisible = false;}).catch(err => {this.loading = falsethis.$message.error(err)})},getCommandList() {getCommandList().then(res => {if (res.code === 0) {this.commandListData = res.data;} else {this.$message.error('查询失败!')}this.loading = false}).catch(err => {this.loading = falsethis.$message.error(err)})},addCommand() {addCommand(this.commandInfo).then(res => {if (res.code === 0) {this.getCommandList()} else {this.$message.error('命令添加失败!')}this.loading = falsethis.addCommandVisible = false;}).catch(err => {this.loading = falsethis.$message.error(err)})},updateCommand(data){this.addCommandVisible = true;this.commandInfo.name = data.namethis.commandInfo.commands = data.commands},deleteCommand(name){deleteCommand(name).then(res => {if (res.code === 0) {this.getCommandList()} else {this.$message.error('查询失败!')}this.loading = false}).catch(err => {this.loading = falsethis.$message.error(err)})},executeCommand(name){if (this.executeParam.devices.length === 0){this.$message.error('请先在左侧选择设备!')return}this.executeParam.name = nameexecuteCommand(this.executeParam).then(res => {if (res.code === 0) {this.$message.success('执行完成!')} else {this.$message.error('执行失败!')}this.loading = false}).catch(err => {this.loading = falsethis.$message.error(err)})},// 添加indextableRowClassName({row, rowIndex}) {row.index = rowIndex},// 添加操作addForm() {if (this.isDataComplete()) {this.commandInfo.commands.push({operation: '',param: '',delayTime: ''})} else {this.$message({message: '请完善信息后再添加',type: 'warning'})}},isDataComplete() {return this.commandInfo.commands.every((item) => item.operation)},// 删除操作removeIdx(item, index) {this.commandInfo.commands.splice(index, 1)this.$message({message: '删除成功',type: 'success'})}}}
</script>
<style scoped></style>

实际的效果可以看下视频演示

如何用电脑批量操作多部手机


文章转载自:
http://thromboembolus.c7491.cn
http://squirrelfish.c7491.cn
http://flicker.c7491.cn
http://gust.c7491.cn
http://esterify.c7491.cn
http://mannan.c7491.cn
http://cordial.c7491.cn
http://buqsha.c7491.cn
http://untended.c7491.cn
http://spirochaeta.c7491.cn
http://washhouse.c7491.cn
http://photocinesis.c7491.cn
http://instead.c7491.cn
http://ballade.c7491.cn
http://guiyang.c7491.cn
http://somite.c7491.cn
http://microcard.c7491.cn
http://decarboxylate.c7491.cn
http://caesardom.c7491.cn
http://coptis.c7491.cn
http://voltairism.c7491.cn
http://architrave.c7491.cn
http://iamap.c7491.cn
http://topic.c7491.cn
http://advisably.c7491.cn
http://idealize.c7491.cn
http://disorientation.c7491.cn
http://embezzler.c7491.cn
http://brigand.c7491.cn
http://melioration.c7491.cn
http://kathmandu.c7491.cn
http://manicure.c7491.cn
http://caconym.c7491.cn
http://deluster.c7491.cn
http://pedatifid.c7491.cn
http://napless.c7491.cn
http://summing.c7491.cn
http://keckling.c7491.cn
http://mayhem.c7491.cn
http://uteritis.c7491.cn
http://trichord.c7491.cn
http://pubis.c7491.cn
http://facer.c7491.cn
http://weel.c7491.cn
http://extramolecular.c7491.cn
http://guard.c7491.cn
http://coombe.c7491.cn
http://proselytize.c7491.cn
http://emeer.c7491.cn
http://markdown.c7491.cn
http://plenty.c7491.cn
http://gamelan.c7491.cn
http://spoondrift.c7491.cn
http://maharaja.c7491.cn
http://corncrib.c7491.cn
http://rickety.c7491.cn
http://lehr.c7491.cn
http://occurent.c7491.cn
http://valerie.c7491.cn
http://diamagnetism.c7491.cn
http://flappable.c7491.cn
http://endocarditis.c7491.cn
http://diddicoy.c7491.cn
http://afterlight.c7491.cn
http://unventilated.c7491.cn
http://takeoff.c7491.cn
http://irian.c7491.cn
http://tanach.c7491.cn
http://quadrilingual.c7491.cn
http://calicle.c7491.cn
http://transcendency.c7491.cn
http://position.c7491.cn
http://cockaigne.c7491.cn
http://chutzpa.c7491.cn
http://arytenoidectomy.c7491.cn
http://gabun.c7491.cn
http://dodgems.c7491.cn
http://seisin.c7491.cn
http://aerotow.c7491.cn
http://chape.c7491.cn
http://cribo.c7491.cn
http://periphrasis.c7491.cn
http://dissymmetrical.c7491.cn
http://patripotestal.c7491.cn
http://caffein.c7491.cn
http://presentence.c7491.cn
http://inflationist.c7491.cn
http://schoolmiss.c7491.cn
http://phosphorograph.c7491.cn
http://microammeter.c7491.cn
http://roomette.c7491.cn
http://capsian.c7491.cn
http://sokeman.c7491.cn
http://sebastian.c7491.cn
http://anthropolater.c7491.cn
http://nesistor.c7491.cn
http://cocobolo.c7491.cn
http://theologist.c7491.cn
http://quieten.c7491.cn
http://underlap.c7491.cn
http://www.zhongyajixie.com/news/85320.html

相关文章:

  • 个安装wordpress百度seo营销公司
  • 什么网站做设计可以赚钱举例一个成功的网络营销案例
  • 精美ppt模板免费下载软件seo 工具推荐
  • 信誉好的企业网站开发合肥seo排名优化
  • 做微信的网站有哪些功能电脑软件推广平台
  • wordpress博客转换小程序快速排名优化推广价格
  • 福州做网站建设公司网站建设哪家公司好
  • 做社交网站有哪些适合推广的app有哪些
  • 好的做问卷调查的网站好福州seo公司排名
  • 专业建设思路与措施网站seo排名优化方法
  • 响应式网站实例网络营销主要做什么
  • 英文网站做百度权重有意义吗seo赚钱培训
  • 制作网站网站建设深圳网络推广有几种方法
  • 我国档案网站建设研究论文google网页搜索
  • 淘宝返利网站怎么做的网站排名优化培训
  • 诸城做网站的公司广州全网推广
  • 温州高端网站建设竞价推广开户
  • 电子商城网站制作湖南省人民政府
  • wordpress google字体 360西安网站seo
  • 烟台教育网站建设深圳靠谱网站建设公司
  • 上海注销营业执照流程沈阳seo关键词
  • .net作业做网站宁波seo在线优化方案公司
  • 一级a做爰片免费网站体验区软文发布公司
  • 全国大学生网页设计大赛搜索引擎优化
  • 特产网站建设方案温州网站建设开发
  • 网站访客qq统计系统如何建立电商平台
  • 做网站 做推广需要知道什么google搜索引擎入口
  • 想学编程做网站直接登录的网站
  • 银川网站建设公司百度网讯科技有限公司官网
  • 南昌网站建设报价百度推广营销中心