HierarchyViewer for iOS 2.0 BETA Introduction

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:

image

(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 image on the toolbar, A file dialog will be opened, select an Automation Results.plist file.

image

 

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:

image

 

And export the result log to specified folder:

image

 

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:

image

 

Start the simulator and app

Clickrun_exc, the file dialog will be opened:

image

 

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

Screen Shot 2012-09-25 at 11.12.48 AM

 

Refresh the Hierarchy view

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

image

 

Terminate the simulator and app

Clickterminate, 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:

imageimage

 

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:

image

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值