随笔分类 -  APP自动化

摘要:修改参考地址 https://blog.csdn.net/qq_43344109/article/details/105404728 阅读全文
posted @ 2022-02-07 12:26 tiansc 阅读(30) 评论(0) 推荐(0) 编辑
摘要:/** * 长按ptt,传入id元素 和 按下的时长 毫秒 需要反复按下几次 * @param id * @param tims * @param cishu */ @SuppressWarnings("rawtypes") public void changanPTTcishu(String id 阅读全文
posted @ 2022-02-07 11:11 tiansc 阅读(154) 评论(0) 推荐(0) 编辑
摘要:封装 /** * 获取到某个页面列表同一个元素,然后使用第一个元素 * @param id * @param shuju */ public void duogeyuansu(String id, int shuju) { List<WebElement> list = android.findEl 阅读全文
posted @ 2022-01-26 16:45 tiansc 阅读(119) 评论(0) 推荐(0) 编辑
摘要:1.pom文件添加依赖 <!-- 图形验证码识别https://mvnrepository.com/artifact/net.sourceforge.tess4j/tess4j --> <dependency> <groupId>net.sourceforge.tess4j</groupId> <a 阅读全文
posted @ 2022-01-07 09:38 tiansc 阅读(6609) 评论(0) 推荐(0) 编辑
摘要:在pom文件添加一下即可解决 <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.7.25</version> <scope>compile</scope> </depe 阅读全文
posted @ 2021-12-24 11:47 tiansc 阅读(112) 评论(0) 推荐(0) 编辑
摘要:在pom文件添加 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEnco 阅读全文
posted @ 2021-12-24 10:59 tiansc 阅读(54) 评论(0) 推荐(0) 编辑
摘要:1、Assert.assertTrue();assertTrue()如果实际输出的结果是false,测试不通过,并停止执行。2、Assert.assertFalse();assertFalse()如果实际输出的结果是true,测试不通过,并停止执行。3、Assert.assertEquals()as 阅读全文
posted @ 2021-12-23 17:53 tiansc 阅读(432) 评论(0) 推荐(0) 编辑
摘要://更换添加的引擎提高测试效率 desiredCapabilities.setCapability("automationName", "uiautomato2"); 参数化 方法可以写在父类中,直接继承父类后 直接调用方法即可,方法上面不要添加注解就可以了 调用 阅读全文
posted @ 2021-12-19 22:13 tiansc 阅读(22) 评论(0) 推荐(0) 编辑
摘要://priority=1表示用例第一个执行,执行完第一个在去执行第二个 @Test(priority=1)//@Test表示测试方法,测试登录 阅读全文
posted @ 2021-12-19 21:42 tiansc 阅读(271) 评论(0) 推荐(0) 编辑
摘要://每一条用例执行完之后切换到执定的页面 Activity activity = new Activity("appPackage", "appActivity"); androidDriver.startActivity(activity); 阅读全文
posted @ 2021-12-19 17:49 tiansc 阅读(25) 评论(0) 推荐(0) 编辑
摘要:新建一个包 创建一个方法 package com.app.utils;import java.io.IOException;import org.apache.poi.EncryptedDocumentException;import org.apache.poi.openxml4j.excepti 阅读全文
posted @ 2021-12-19 13:01 tiansc 阅读(349) 评论(0) 推荐(0) 编辑
摘要://隐式等待 30s 超过30s还没有继续往下操作则报错 androidDriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);//秒为单位 每一步 固定等待 //等待页面加载完成 10s Thread.sleep(10000) 阅读全文
posted @ 2021-12-18 15:28 tiansc 阅读(65) 评论(0) 推荐(0) 编辑
摘要:方法 import org.openqa.selenium.By;import org.openqa.selenium.NoSuchElementException;public class Chazhaoyuansu { /** * 如果找到这个元素则继续执行下面的元素,找不则返回失败false, 阅读全文
posted @ 2021-12-17 22:59 tiansc 阅读(208) 评论(0) 推荐(0) 编辑
摘要:1.下载地址:https://jenkins.io/download/ 2.直接选war包下载 3. 把文件移动到空间足够的地方输入命令 4.然后输入下面的命令执行 java -jar jenkins.war 5.启动后 打开浏览器进入网页 http://localhost:8080/ 安装插件al 阅读全文
posted @ 2021-11-25 15:02 tiansc 阅读(148) 评论(0) 推荐(0) 编辑
摘要:1.配置环境变量方法: https://www.cnblogs.com/tiansc1/p/15596610.html 2.更具上一篇配置环境变量成功后,需要执行一下程序,生成一个allure-results文件在程序的工程目录路径下 3.如何先执行一下程序呢? 3.弹出 4.输入 clean te 阅读全文
posted @ 2021-11-25 09:44 tiansc 阅读(1177) 评论(0) 推荐(0) 编辑
摘要:一、下载allure地址 https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip 到girhub上下载Allure2 ,地址:https://github.com/allure-fram 阅读全文
posted @ 2021-11-24 09:10 tiansc 阅读(270) 评论(0) 推荐(0) 编辑
摘要:一、找到了TestNG的历史版本:网址 https://github.com/cbeust/testng-eclipse/ 二、选择一个地址:https://testng.org/testng-eclipse-update-site/7.4.0/ 三、help>install new softwar 阅读全文
posted @ 2021-07-30 12:01 tiansc 阅读(252) 评论(0) 推荐(1) 编辑
摘要:修改1.5 修改成功 阅读全文
posted @ 2021-07-16 09:19 tiansc 阅读(287) 评论(0) 推荐(0) 编辑
摘要:有时候遇到列表,目标元素还不在第一页,需要上滑或者下滑,加载显示到第二页,找到元素后,并且进入成功 滑动找到元素后并且点击 //列表格式页面,想打开的一行没有在第一页,需要上下滑动才可以使用以下方法 public static void swipeToElement() throws Interru 阅读全文
posted @ 2021-07-15 16:05 tiansc 阅读(140) 评论(0) 推荐(0) 编辑
摘要:// 获取到toast信息 // toast只能够根据它的文本值来定位到 WebElement toastElement = androidDriver.findElementByXPath("//*[contains(@text,'登录成功')]"); //toast元素是不能够点击,提示用户信息 阅读全文
posted @ 2021-07-15 15:36 tiansc 阅读(281) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示