ICode9

精准搜索请尝试: 精确搜索
  • App自动化测试(四)uiautomator定位元素2022-07-16 21:05:53

    uiautomator定位 优点:uiautomator是Android工作引擎,速度快 缺点:书写复杂,容易出错 driver.find_element_by_android_uiautomator("表达式").click() newUiSelector().resourceId('id') newUiSelector().className('clasename') newUiSelector().description('

  • 还在用策略模式解决 if-else?Map + 函数式接口就搞定了。。。2022-02-08 09:35:04

    来源:https://blog.csdn.net/qq_44384533/article/details/109197926 本文介绍策略模式的具体应用以及Map+函数式接口如何 “更完美” 的解决 if-else的问题。 文章目录 需求 策略模式 Map+函数式接口 最后捋一捋本文讲了什么 需求 最近写了一个服务:根据优惠券的类型resourceType

  • map函数式接口,代替if_else2022-01-24 10:02:02

    map函数式接口,代替if_else 用上了Java8的新特性lambda表达式 判断条件放在key中对应的业务逻辑放在value中 @Service public class QueryGrantTypeService { @Autowired private GrantTypeSerive grantTypeSerive; private Map<String, Function<String,String

  • Map+函数式接口2022-01-20 21:32:10

    用上了Java8的新特性lambda表达式 判断条件放在key中 对应的业务逻辑放在value中 这样子写的好处是非常直观,能直接看到判断条件对应的业务逻辑 需求:根据优惠券(资源)类型resourceType和编码resourceId查询派发方式grantType 上代码: @Service public class QueryGrantType

  • java8 lambda表达式 if else 策略模式优化2022-01-16 11:59:11

    if else 策略优化 Map+函数式接口实现优化新的改变 Map+函数式接口实现优化 上代码: 不同策略的service业务实现 /** * @Author: Clint * @Date: 2022/1/16 10:54 * @Version: 1.0 * @Description: */ @Service public class GrantTypeSerive { public String r

  • Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object refer2021-07-10 14:06:36

    问题原因: 1,int和Integer判断是否相等时出错 2,用到int的地方,实际传值是Integer (int是基本类型,存数值;integer是对象,用一个引用指向这个对象) 解决方案: 对Integer参数进行null判断,如果不为null,再将Integer值转换成int public Integer getResource(){ return rid; } public void

  • Android 获取系统菜单栏高度2021-07-10 12:02:37

    public int getNavigationBarHeight() { Resources resources = getResources(); int resourceId = resources.getIdentifier("config_showNavigationBar","bool","android"); if ( resourceId > 0) { if(resources.getBoolean(resou

  • Spring Security OAuth2之resource_id配置与验证2021-07-06 14:04:11

    一、resource_id的作用 Spring Security OAuth2 架构上分为Authorization Server认证服务器和Resource Server资源服务器。我们可以为每一个Resource Server(一个微服务实例)设置一个resourceid。Authorization Server给client第三方客户端授权的时候,可以设置这个client可以访问哪

  • smobiler仿自如app筛选页面2021-06-17 13:01:26

      原型图: 完整代码见git : https://github.com/comsmobiler/BlogsCode/blob/master/Source/BlogsCode_SmobilerForm/Sele ctForm/ZRSelectForm.cs 创建窗体 创建一个SmobilerForm ,文件名设置ZRSelectForm,将窗体的Layout设置Relative,再设置窗体的Statusbar属性 并在窗体中拖入两

  • smobiler仿自如app筛选页面2021-04-16 15:52:30

    原型图:完整代码见git :https://github.com/comsmobiler/BlogsCode/blob/master/Source/BlogsCode_SmobilerForm/SelectForm/ZRSelectForm.cs创建窗体创建一个SmobilerForm ,文件名设置ZRSelectForm,将窗体的Layout设置Relative,再设置窗体的Statusbar属性并在窗体中拖入两个Panelpanel1

  • element tree 默认勾选已知id2021-01-05 14:33:24

    个人日常记录,方便查阅 <el-tree ref="tree" :data="treeData" show-checkbox accordion :props="treeProps" node-key="resourceId" :default-expanded-keys="default

  • ArrayAdapter requires the resource ID to be a TextView2020-11-16 10:02:00

    错误代码: ListItem2Adapter adapter = new ListItem2Adapter(ListItem2Activity.this,R.layout.list_item_pic,data); ListItem2Adapter.java : public class ListItem2Adapter extends ArrayAdapter<ListItemPic> { private int resourceId; public ListItem2Ad

  • springMvc前端传递参数为json数组形式,记一次心得2020-07-08 22:37:53

    记一次springMvc传递json数组,后端如何接收的问题? 例子:在postman中写好测试样例数据: {"TDGY_CJGS": [{"RESOURCEID":"6", "RESOURCENO":"6", "NOTICEID":"6", "NOTICENO":"6", "CRXZ":&quo

  • 微信朋友圈自动点赞2019-09-25 19:01:17

    import time import uiautomator2 as ui2 d = ui2.connect('http://172.18.105.47:7912') d.app_start("com.tencent.mm", stop="True") fs = d(resourceId="com.tencent.mm:id/sh")[2] time.sleep(1) fs.click() pyq = d(resource

  • Egret入门学习日记 --- 第三十九篇(书中 11.12 ~ 11.15 节 内容)2019-08-17 23:00:57

    第三十九篇(书中 11.12 ~ 11.15 节 内容)   这篇日记写完,龙骨篇就结束了。   最难的点就是掌握龙骨动画类的封装。     开始 11.12 节。               重点:     1、创建帧项目,改名,拖入图片。   操作:     1、创建帧项目,改名,拖入图片。       创建

  • uiautomator2简单使用记录。2019-01-27 14:01:08

    开始之前大概了解一下,这个目前可以用于app端一些爬虫使用,调试不叫方便,配合mitmproxy使用,远胜于appium。appium环境太复杂。 首先是安装依赖库。 adb传送门百度网盘。提取码:lfc7 pip install --pre uiautomator2 pip install pillow 需要安卓adb环境,并且确保已经启动adb。 如

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

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

ICode9版权所有