随笔分类 - Android
摘要:一、同级定位时,先定位上级 我想定位【必填】框,我先定位【姓名】的同一个上级 self.driver.find_element(MobileBy.XPATH,"//*[contains(@text,'姓名')]/../*[@text='必填']").send_keys(name) self.driv
阅读全文
摘要:直接上代码: import io.appium.java_client.AppiumDriver; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.W
阅读全文
摘要:配置环境: MacOS:10.13.6 java:1.8 IntelliJ IDEA:2018.3 Android SDK:25 Appium:1.9.1 Appium-desktop:1.7.1 java-client:6.1.0(最新且不是Bate版本) junit:4.12 Android:6
阅读全文
摘要:进行调试,打开X5: http://debugmm.qq.com/?forcex5=true http://debugx5.qq.com http://debugtbs.qq.com 一般前两个就可以了。 微信打开:http://debugx5.qq.com,打开页面,按图中勾选。 然后再谷歌浏览器
阅读全文
摘要:desired_cap = { "deviceName":"vivo", # 真机名称 "platformName":"android", # 使用的移动端:android、ios "platformVersion":"8.1", # 移动端版本 "appPackage":"com.csksc2b.
阅读全文
摘要:安卓8.0以后uiautomatorviewer会报错,解决办法如下: 参考:《android 8.0 以后 uiautomator 无法直接使用的问题》 步骤一: 先执行命令:(注意:想要定位一个页面,每次都要执行如下命令) adb shell uiautomator dump /sdcard/s
阅读全文
摘要:问题1: 报错: Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0): No cached version available for offli 参考解决:《Could not download fastutil.jar (i
阅读全文
摘要:目录: 前提、Mac环境下手动配置Android SDK 一、 Android Studio下载及配置 二、AVD模拟器配置运行 前提、Mac环境下手动配置Android SDK 一、 Android Studio下载及配置 二、AVD模拟器配置运行 三、在Android Studio 中配置Gen
阅读全文
摘要:Github测试样例地址:https://github.com/appium-boneyard/sample-code/tree/master/sample-code/examples ①定位text,通过UiSelector定位 # text定位 self.d.find_element_by_an
阅读全文
摘要:上一篇文章介绍安装appium测试环境,这一片研究介绍如何测试Android自动化。 上一篇地址:《【Mac + Appium学习(一)】之安装Appium环境》 这一篇参考:《Mac 下 appium 自动化测试 Android 测试配置和脚本编写(四)》 配置环境: Appium version
阅读全文
摘要:Mac系统下安装uiaotumator2: 参考网址:《uiautomator2》以及参考github官方文档 注意:下面有坑,如果你没有下面的问题请直接跳转到 1、安装uiaotumator2命令: 提示报错: Could not install packages due to an Enviro
阅读全文
摘要:Ubuntu系统下安装uiautomator2步骤: 1、安装命令: 但是报错: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-fd8i2dr1/uiautomator2/ 后经大神提示
阅读全文
摘要:github学习地址:https://github.com/openatx/uiautomator2 <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'> 个人总结的ATX学习资料文章: 1、Ubuntu系统: 《【Ubuntu安
阅读全文
摘要:首先感谢虫师总结的教程:《appium新手入门》。以及:《appium新手入门(2)—— 安装 Android SDK》 目录: 安装Appium&安装node.js 安装jdk1.8 & android-sdk-windows 安装.net framework4.0以及4.5 安装python-c
阅读全文