ICode9

精准搜索请尝试: 精确搜索
  • 移动端UI自动化测试DEMO之环境部署(基于uiautomator2)2022-01-26 10:32:54

      近期,由于没有项目不是很忙,所以动手研究起关于移动端APP的自动化测试的功能。原本已经找到了Appium来做移动端的自动化测试,但是后面看到有人推荐用uiautomator2。因此,我也就尝试一下,看看效果如何。 1、安装adb,具体操作,可以百度一下      2、安装uiautomator2; 因为我使用的

  • Flutter-uiautomator2之自动化测试避坑(元素篇)2021-12-14 13:31:27

    直接上需要注意的点 一、flutter开发的app一般不需要进行id定位   1.最常用的元素定位是Description   2.输入框定位是text   这两个完全够用了 二、通过xpath进行Description定位时会遇到以下问题:   1.python -m weditor调出weditor后可能会遇到这样的xpath       

  • ATX3-环境准备2021-12-08 04:00:07

    安装 1.Install uiautomator2 # Since uiautomator2 is still under development, you have to add --pre to install the development version pip install --upgrade --pre uiautomator2 # Or you can install directly from github source git clone https://github.com/ope

  • python+uiautomator2连接设备后weditor无法稳定识别小程序内的所有元素的解决方法2021-09-17 17:04:51

    之前写UI脚本时存在无法识别微信小程序,为此查询了很多文章,有些大佬表示可以通过降低微信的版本号,就可以识别到小程序内的元素,我实验了下,确实可以识别到微信小程序内的元素,但是不稳定,有时候小程序一删除,第二天调试就识别不到元素了,我试验了很多遍,查看怎么才能再次识别,最终找到了一

  • Python+uiautomator2指定区域截图2021-09-04 11:31:41

    想区域截图,但是在网上找了一圈,没有什么有用的信息,基本都是全屏截图的信息。最后只能自己尝试着摸索了。 已知d.screenshot()是截取整个屏幕,尝试根据元素截图d(resourceId="xx.xx.xx").screenshot截图,发现可以截取指定元素区域,具体代码如下 d = u2.connect("192.168.10.10") d(re

  • uiautomator2 入门教程2021-07-25 11:33:53

    一、前言   在 Android 自动化测试方面,Google 提供了一个基于 Java 开发的库 UiAutomator,基本上支持所有的 Android 事件操作,使用简单。        在此基础上,有大佬开发出了一个 Python 的第三方库 uiautomator,原理是在手机上运行了一个http rpc服务,将uiautomator中的功能开

  • 安卓设备 WiFi 统一管理以及设备自动化测试实践 (零散知识梳理总结)2021-07-20 19:31:11

    众所周知,安卓单台设备的UI自动化测试已经比较完善了,有数不清的自动化框架或者工具。但是介绍多设备管理的内容并不多,当手里的手机多了之后,要做自动化测试平台,这块的东西又不得不碰,摆脱USB限制,接入WiFi,才能更加自由 框架介绍 1.ATX ATX(AutomatorX) 是一款开源的自动化测试工具,支

  • Toast提示信息获取2021-07-18 19:03:13

    Toast 要获取toast信息要满足以下两个要求: 1、appium版本1.6.3+才支持toast获取    appium1.6.3没有可视化界面,解决方案下载appium-desktop-setup-1.4.4ia32.exe 2、代码中必须制动automationName为:UiAutomator2 3、UiAutomator2只支持安卓版本5.0+ 因此夜神模拟器,海马王都用

  • 常用操作2021-07-08 23:00:12

      备注:电脑安装uiautomator2和weditor后,要记得运行python -m uiautomator2 init,这样手机端会自动安装ATX端 1、录屏: device = u2.connect() now = str(datetime.datetime.now()).replace(":", "_") r = device.screenrecord("Mp4/" + now + ".mp4") r.stop(

  • python+uiautomator2+pytest自动化测试框架(三)2021-07-06 21:33:14

    python+uiautomator2+pytest自动化测试框架(三) 目的解决多设备运行,并行多台设备及多用例同时进行 1、修改conftest.py 初始化设备进行了修改,根据连接的devices进行判断,传给对应进程中 #初始化设备 @pytest.fixture(scope="session", autouse=True) def driver(tmp_path_factor

  • 开发遇到的问题及其解决2021-06-04 11:33:47

    总纲:循序渐进、不急不躁、找到根因 1、Attributerror: Session object has no attribute 'watchers' 出现场景:在Jenkins用例编写时,出现以上问题提示。 程序之前都是正常的,周五升级了uiautomator2、weditor、pytest的版本后出现了此问题。 分析解决:通过问题log: d:\python37\lib\sit

  • UiAutomator、UiAutomator2、Bootstrap的关系2021-05-07 13:58:16

    UiAutomator是Android自动化测试框架,是谷歌在Android4.1版本发布时推出的一款用Java编写的UI测试框架。其最大的特点就是可以跨进程操作,我们可以使用UiAutomator框架提供的一些方便的API来对安卓应用进行一系列的自动化测试操作,如点击、滑动、键盘输入、长按以及常用的断言方

  • Uiautomator2自动化测试框架2021-04-29 19:03:32

    一、安装Adb工具包 命令总览: adb devices # 列出当前连接的设备sn号 adb kill-server # 停止服务 adb start-server # 启动服务 adb connect [ip:port] # 连接设备,port可以不指定 adb dis

  • python3+android自动化之Uiautomator22021-04-14 20:29:11

    python3+android自动化之Uiautomator2 1、环境准备:android sdk:[下载地址](https://developer.android.google.cn/studio/releases/platform-tools?hl=zh-cn)uiautomator2 :`pip install uiautomator2 ` 2、连接手机3、代码展示 1、环境准备: android sdk:下载地址 uiauto

  • APP 元素定位总结(未完待补充)2021-04-05 18:34:07

    背景 个人记录,团队分享使用,好记性不如烂笔头~ 定位工具 推荐使用顺序:weditor > uiautomatorviewer > Appium inspector 三种定位工具 Python uiautomator2 中的 weditor Android SDK 自带的 uiautomatorviewer Appium inspector 三种工具异同点 Appium inspector 需要配置启动

  • python + uiautomator2 实现钉钉工单自动批量提交2021-04-05 18:33:19

    背景 每个月初,团队负责人需要提交整个团队的上个月绩效评价以及本月的绩效设定,在钉钉上选择员工和Excel 附件提交员工个人审批。 随着团队人员的增加,人工提交耗时耗力,我偶尔还提错,故写个简单的 APP 自动化脚本实现。 懒使人进步~ 人工提交流程 员工绩效设定与员工绩效评价流程一直

  • uiautomator2结合python的一些操作2021-03-29 15:03:16

    1 import os 2 3 # 获取手机系统信息 4 phone_sys = os.popen('adb shell "cat /system/build.prop | grep "product""').read() 5 print(phone_sys) 6 7 # 获取手机设备型号 8 device_name = os.popen('adb shell getprop ro.product.model

  • App自动化脚本配置信息2021-03-20 15:29:41

    App自动化脚本配置信息 import time from appium import webdriver # 准备自动化配置信息 desired_caps = { # 移动设备平台 Android / IOS 'platformName': 'Android', # 平台OS--安卓版本号,写整数位即可 'plathformVersion': '8', # 设备

  • uiautomator2基本例子2021-03-08 14:04:47

    uiautomator2基本例子 # coding:utf-8 import uiautomator2 as u2 import timeimport subprocess import shutil # adb_connect_init cmds = [ "taskkill /f /im adb.exe", 'start adb', "adb connect 127.0.0.1:62001", "a

  • [uiautomator2]python3使用uiautomator2实现安卓app自动化demo2021-02-13 16:59:31

    传送门:uiautomator2环境搭建源码地址:uiautomator2源码地址 # -*- coding: utf-8 -*- # 1.安装 uiautomator2 使用命令:python -m pip install -U uiautomator2 # 2. 如下demo就可以使用uiautomator2的api写自动化用例了 import uiautomator2 as u2 from time import sleep

  • 使用UIAutomator2实现自动测试2021-02-12 14:29:59

    在CSDN上看到讲解实现蚂蚁森林自动收能量的文章, 发现使用的UIAutomator2很有用处,所以自己也试了一下: 1. 电脑上安装uiautomator2: pip install --upgrade --pre uiautomator2 2. 为手机安装ATX的APP,用于httprpc通信: python -m uiautomator2 init 3. 在[你的Android SDK目录]\too

  • UIautomator2-手动init(安装)指南2020-06-19 12:02:48

    前言 一般来说可以用 python -m uiautomator2 init 这个命令帮助我们将需要的东西安装到手机上。 但是有肯专研的人想知道到底这个init命令做了哪些事情。请继续往下看 python-uiautomator2 是安卓应用的Java测试框架Uiautomator的一个Python封装。所以uiautomator这个app是一定

  • 抓取抖音数据(fiddler+uiAutomator2+java)2020-05-16 21:39:28

    最近研究抖音的爬虫,获取抖音的粉丝信息,分享给大家(共同学习,进步)我会把相关代码上传,方便大家直接下载使用 使用的软件:fiddler + androidStudio(MyEclipse/eclipse) ,硬件:手机或手机模拟器(抖音版本:10.8.0) 1.使用fiddler来抓取抖音https的接口信息,uiAutomator2用来实现自动化

  • uiautomator2 init初始化失败2020-04-30 21:54:42

    可以手动安装下apk,我是卸载之后,输入命令不会重新安装。 https://github.com/openatx/android-uiautomator-server/releases 找一个版本跟你uiautomator2版本一致的apk手动安装即可,再执行   python -m uiautomator2 init  

  • 记一次在termux上部署python+uiautomator2实现手机上直接跑代码2020-01-30 11:54:44

    termux的安装 参考Termux 入门与实践 - 简书 https://www.jianshu.com/p/6fd84cc74a5e 一定记得执行termux-setup-storage给访问内部存储权限 安装Python及其相关依赖库 pkg upgrade pkg install python pip install cython pkg install libxml2 libxslt pkg install -y python n

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有