随笔分类 - Appium
摘要:一、同级定位时,先定位上级 我想定位【必填】框,我先定位【姓名】的同一个上级 self.driver.find_element(MobileBy.XPATH,"//*[contains(@text,'姓名')]/../*[@text='必填']").send_keys(name) self.driv
阅读全文
摘要:目录 一、目录模板 二、创建启动APP或WEB文件 三、创建base_page文件 四、关联每个页面跳转 五、元素定位文件和yaml数据文件 六、创建测试用例 七、接口自动化目录模板 八、我的Github举例源码 一、目录模板 返回目录 有以下常用的模块可以套用WEB自动化和APP自动化 # 主要模
阅读全文
摘要:一、ID定位 uiautomatorviewer里面的:resource-id driver.find_element(By.ID,"com.csks.businesses:id/tv_number").click() 二、利用index角标定位 # 利用index角标定位 # 获取多个输入框 in
阅读全文
摘要:直接上代码: import io.appium.java_client.AppiumDriver; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.W
阅读全文
摘要:前提条件: 1.Xcode版本为Xcode10及以上2.Appium版本必须为1.9及以上,因为Xcode为10.0 3.appium-desktop4.安装所需依赖库,包括: a.Homebrew b.Git c.node (brew install node) d.npm (brew insta
阅读全文
摘要:配置环境: 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
阅读全文
摘要:写自动化测试代码中,数据驱动传递参数比较方便一些,也便于后期维护,下面介绍两种数据驱动: 下面是test.yaml文件: start_HRApp: ip: 127.0.0.1 port: 4723 implicitly_wait: 10 caps: android: platformName: An
阅读全文
摘要:进行调试,打开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
阅读全文
摘要:环境: MacOS:10.13.6 Virtualbox:5.2.22 Genymotion:genymotion-2.12.2 本文Virtualbox、Genymotion下载地址: 链接:https://pan.baidu.com/s/1ACubK3jiCdKBxZ-oiJVLTg 密码:5n
阅读全文
摘要:Github测试样例地址:https://github.com/appium-boneyard/sample-code/tree/master/sample-code/examples ①定位text,通过UiSelector定位 # text定位 self.d.find_element_by_an
阅读全文
摘要:环境: Appium:1.9.1 Appium-desktop:1.7.1 Xcode:10.0 IOS:iPhone5S(10.3.3) Mac:10.13.6 ①获取手机屏幕size:长、宽 《Appium Appium 1.9 版本 BUG:使用 get_window_size () 方法报错
阅读全文
摘要:在做这一节之前先配置我的另一篇文章所需要安装的前提准备条件:《【Mac + Appium学习(一)】之安装Appium环境前提准备》 一、安装IOS自动化测试环境 配置环境: Appium version :1.9.1 Appium-desktop:1.7.1 Xcode:10.0 iPhone5S
阅读全文
摘要:产生下面的原因是因为:与uiautomator2的weditor冲突,两者不能同时使用。 有时打开appium时会报错: [UiAutomator] UiAutomator exited unexpectedly with code 0, signal null 经查询有以下方案: 《UiAutom
阅读全文
摘要:上一篇文章介绍安装appium测试环境,这一片研究介绍如何测试Android自动化。 上一篇地址:《【Mac + Appium学习(一)】之安装Appium环境》 这一篇参考:《Mac 下 appium 自动化测试 Android 测试配置和脚本编写(四)》 配置环境: Appium version
阅读全文
摘要:环境: Appium version :1.9.1 Appium-desktop:1.7.1 Xcode:10.0 IOS:iPhone5S(10.3.3) Android:6.0.1 Mac:10.13.6 一、需要mac系统里有如下软件安装,才可以进行appium环境搭建 1、检查java是否安
阅读全文
摘要:在网上查了很多资料都说改什么文件名和注册表什么的,根本没用,后来查到一篇文章,提供了下面的解决办法: 地址:《Microsoft .NET Framework 4.0安装时发生严重错误 无法安装》,表示感谢。 解决办法: 也就是说,把C盘下面的两个文件重新命名了就ok 了。 C:\Windows\S
阅读全文
摘要:首先感谢虫师总结的教程:《appium新手入门》。以及:《appium新手入门(2)—— 安装 Android SDK》 目录: 安装Appium&安装node.js 安装jdk1.8 & android-sdk-windows 安装.net framework4.0以及4.5 安装python-c
阅读全文