We know HierarchyViewer is an useful tool in Android SDK. The developer and tester, who haven’t the source code of the application, also can get the the hierarchy view of activities, and every properties and screenshot. Can we have similiar tools for iOS? now the answer is sure.

 

HierarchyViewer for iOS is an open source tool developed by Vowei, use GPL v3 protocol. It is based on eclipse RCP framework, support Mac OS X, Windows and Linux. Following is the screenshot under Mac OS X:

(HierarchyViewer 1.0)

 

For English User, I am sorry currently we haven’t English version, but we are working on it now. I believe you can easy to use Chinese version after you read this acticle.

 

Let us begin to introduce it. HierarchyViewer for iOS have two kind of data source: one is UIAutomation script result log file –- contains Automation Results.plist file and screenshots, generating hierarchyviewer from UIAutomation result log have been implemented since 1.0. the other way is achieving from running app on iOS simulator directly, this is the new feature of 2.0.

 

Open Log File

Open on the toolbar, A file dialog will be opened, select an Automation Results.plist file.

 

Then, you can view all the UI element hierarchy in our tool.

 

How to Create Log File

How can we make the .plist file have UI element information? We must insert following code into the script whatever you interested,it will log all elements structure into result log file:

target.logElementTree()

 

Then, when you Execute it:

 

And export the result log to specified folder:

 

After that, you can open the log file you just created. (There are a log file under /HierarchyViewer-4-iOS/hierarchyviewerlib.test/src/Logs)

 

2.0 New Feature: achieving hierarchy view from running app on iOS simulator

The new feature of 2.0 can be used only on Mac OS X, before you use it, make sure Instruments and iOS simulator is installed on the system.

 

There are 3 buttons is added into toolbar in 2.0:

 

Start the simulator and app

Click, the file dialog will be opened:

 

Select and open an iOS simulator App, the simulator will kick off and the app will be load:

 

Refresh the Hierarchy view

When your UI is changed, you can click the green fresh button , to refresh the hierarchy view.

 

Terminate the simulator and app

Click, will close the simulator.

 

Other features

HierarchyViewer for iOS 2.0 have some othre useful features, for example:

Generating script calls.

Right click the node in the hierarchy view, It can generate the element call and save in the clipboard:

 

In clipboard:

target.frontMostApp().windows()[0].tableViews("Empty list").groups("Advanced Options").elements("Advanced Options")

 

Generating and test iQuery:

iQuery is a jquery-like library developed by Vowei, used to query the iOS and Android UI element. HierarchyViewer have an iquery generator which used to generate and test iQuery statement:

最新文章

  1. javascript 字符串多行的写法
  2. linux下的gcc编译器
  3. Jsp九大内置对象及其作用域
  4. POJ 3686 The Windy's 最小费用最大流
  5. C#调用webservice 时如何传递实体对象
  6. spring mvc 自定义转换器
  7. jQuery文本框(input textare)事件绑定方法教程
  8. HDOJ/HDU 2163 Palindromes(判断回文串~)
  9. admob广告开始个人资料网址
  10. flumeng-kafka-plugin
  11. Job 逻辑执行图
  12. 14.Java中的Future模式
  13. 支付宝小程序PHP全栈开发--前端样式的设计.acss样式详解
  14. 零基础如何一步一步开始搭建高性能直播平台?现以GitChat·架构来进行说明
  15. flex布局简析
  16. Oracle数据安全解决方案(1)——透明数据加密TDE
  17. 【小o地图Excel插件版】计算两点间驾车路径,获取途径道路、驾车距离、耗时等信息
  18. Oracle 查看链接数、创建索引等的DDL语句
  19. Java连接RabbitMQ之创建连接
  20. golang go语言通道类型的通道示例 通道的通道

热门文章

  1. Struts和SpringMVC两种MVC框架比较
  2. 2016HUAS暑假集训训练题 B - Catch That Cow
  3. BizTalk开发系列(八) BizTalk Server 常识整理
  4. php对二维数组进行相关操作(排序、转换、去空白等)
  5. 现在写 PHP,你应该知道这些
  6. Postgres-enum
  7. Go-Agent原理分析及FQ介绍
  8. 20145209&20145309信息安全系统设计基础实验报告 (5)
  9. an alternative to symmetric multiprocessing
  10. C#编程之委托与事件四(一)【转】