How Appium UIAutomator2 Server Works

技术标签: Appium

转自:https://testerhome.com/topics/9240

 

简单概括一下:

ps. 我们都知道appium只有在uiautomator2下可以实现对toast的识别,那是因为Google新增了AccessibilityService服务,重写该服务可以实现对Notification和Toast内容的捕捉

appium-uiautomator2-server

 

  • 通信模块使用了Netty Server,较之bootstrap使用的ServerSocket,Netty是一个高性能、异步驱动的NIO框架,占用内存少,性能更好。

运行原理

  • 客户端通过传递desired capabilities给appium node server来创建一个session, appium server根据automationName去启动对应的driver,默认是android-driver。
  • automationName设为UIAutomator2,appium会调用appium-uiautomator2-driver,同时将uiautomator2 server的两个apk安装到测试设备上
    1. appium-uiautomator2-server-vx.x.x.APK,执行handlers
    2. appium-uiautomator2-server-debug-androidTest.apk,只有一个test,用于启动server

 

  • AppiumServlet ,管理请求的路由,将driver发过来的请求转发给对应Handler.
  • Handler,调用UiAutomator V2去执行指定操作,操作的结果经AppiumResponse统一封装
  • AppiumResponse,操作结果返回给appium-uiautomator2-driver,再将结果返给客户端

来源:网络


智能推荐

How Flyway works

The easiest scenario is when you point Flyway to an empty database. It will try to locate its schema history table. As the database is empty, Flyway won't find it and will cre...

How Webkit works笔记

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 主要是参考google的这个幻灯片 webkit的作用就是将html,css,javascript渲染成web page。 它的主要组件有: api接口 webkit,webkit2 和平台的具体实现做绑定 bindings。绑定的准确定义我还没完全弄清,从搜集到的资料来看,绑定是为了将Webkit上的对象转...

how-https-works

https://strongarm.io/blog/how-https-works/ 核心问题; 取得要访问网站的非对称加密的public key Bringing it All Together Now we’ve talked about every step involved in HTTPS authenticating the websites you visit. Let&...

How MapReduce Works

转自:http://blog.csdn.net/luyee2010/article/details/8624470 一、从Map到Reduce MapReduce其实是分治算法的一种实现,其处理过程亦和用管道命令来处理十分相似,一些简单的文本字符的处理甚至也可以使用Unix的管道命令来替代,从处理流程的角度来看大概如下: 简单的流程图如下: 对于Shuffle,简单地说就是将Map的输出通过一定的...

How the Web Works

把 Learn Python The Hard Way 书中的相关内容,抄了一遍。 又是一本不可多得的好书。 去年寒假,就是今年一月份,打印了这本书,学了一部分。 三月份在院楼机房花了三星期,大概看完了这本书。 半年后的现在,再看一遍,依然有好多收获。 真的,不用特意寻找特别多的学习资源,好好利用现有的资源。 真的能学好三、两本书。找份工作,没问题的。 I’m start with a...

猜你喜欢

How Blink works

How Blink works 原文链接:https://docs.google.com/document/d/1aitSOucL0VHZa9Z2vbRJSyAIsAz24kX8LFByQ5xQnUg/edit      Blink是Web平台的渲染引擎。 简单地说,Blink实现了所有在浏览器选项卡中呈现的内容: 实施网络平台的规范(例如HTML标准),包括DOM,...

原型对象,原型链

函数都有prototype属性,它指向原型对象。 实例对象有__proto__属性,它指向对象原型 每一个原型对象都有constructor输赢,指向构造函数,每一个原型对象又具有__proto__属性,这个指向Object.prototype.在这里插入图片描述...

Node 调用 dubbo 服务的探索及实践

2.Dubbo简介 2.1 什么是dubbo Dubbo是一款高性能、轻量级的开源Java RPC框架,它提供了三大核心能力:面向接口的远程方法调用,智能容错和负载均衡,以及服务自动注册和发现。 2.2 流程图 Provider : 暴露服务的服务提供方。 Consumer : 调用远程服务的服务消费方。 Registry : 服务注册与发现的注册中心。 Monito...

mysql总结

mysql基础入门的总结     关于数据库:     数据库是软件开发人员要掌握的基本工具,软件的运行的过程就是操作数据的过程,数据库中的数据无非就是几个操作:增-删-查-改。         Mysql安装完成后,需要配置变量环境,找到配置路径path,然后把mysql安装目录bin文件导入就可以了。 然后运行cm...

adb及monkey常用命令

adb常用命令: 查看手机是否连接:adb devices   连接设备:adb connect 设备ip:端口号  若有连接多个设备需指明设备ip及端口号 安装APP:adb install [-r] 包名  -r表示覆盖安装,首次安装可省略 卸载APP:adb uninstall 包名 列出设备中所有应用包名:adb shell pm list packages ...

问答精选

Correctly formatting GCM notifications?

I'm currently trying out the google cloud messaging service with its sample application "Guestbook." https://developers.google.com/cloud/samples/mbs/ I'm attempting to send notifications tha...

Are there any performance benefits of using Asynchronous functions over Synchronous in Node Js?

Now I came across an article that distinguishes between an Asynchronous function and Synchronous functions. From my understanding of the different examples and explanations, synchronous functions are ...

Python: Costing calculator output

Good day all I'm busy creating a small costing calculator for the signage department. I'm not getting the calculator to output the amount. Brief Description: You enter the height and width and then wh...

Flask-SQLAlchemy - model has no attribute 'foreign_keys'

I have 3 models created with Flask-SQLalchemy: User, Role, UserRole role.py: user.py: user_role.py: If I try (in the console) to get all users via User.query.all() I get AttributeError: 'NoneType' obj...

Seeding many PRNGs, then having to seed them again, what is a good quality approach?

I have many particles that follow an stochastic process in parallel. For each particle, there is a PRNG associated to it. The simulation must go through many repetitions to get average results. For ea...

相关问题

相关文章

热门文章

推荐文章

相关标签

推荐问答