摘要: 1.contexts contexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的控件 :Usage: driver.contexts 用法 driver.contexts 2. c 阅读全文
posted @ 2018-01-05 16:18 居安思危 阅读(1542) 评论(0) 推荐(0)
摘要: (1)获取当前页面的activity名,比如: (.ui.login.ViewPage) 比如我们需要实现这个登录的功能时,主要思路为如果当前界面为登录页面时,就进行登录行为,否则就跳转到登录页面。其伪代码为: (2)获取当前页面的树形结构源代码,与uiautomatorviewer截屏所展示出来的 阅读全文
posted @ 2018-01-05 16:06 居安思危 阅读(1768) 评论(0) 推荐(0)