Page tree
Skip to end of metadata
Go to start of metadata

Last updated: May 31, 2020 12:50

Hybrid applications should be instrumented when installed. Learn how to identify if it was instrumented.

Instrument Hybrid Applications

To test a hybrid application (a mobile application that incorporates WebView elements) in the Perfecto Lab, the application needs to be instrumented. This process allows the Perfecto system to identify the elements in the WebView.

Legacy | Use Object Spy to identify

 

The Object Spy helps you identify the elements of the application's user interface by presenting the object tree. When the element in the tree is a native OS element the class name of the elements will be:

 

  • UIAclass - for iOS UI elements. (For example, UIAScrollView, UIACollectionView)
  • android.widget.class- for android UI elements. (For example, android.widget.TextView, android.widget.Button)

 

For DOM elements and instrumented elements the element classes that appear in the Object Tree take the form of <class>, where the class may be BODY, DIV, A, B, etc.

 

To determine if the application that you are working on is instrumented -

 

1. Start the application and display the WebView of the application.

 

2. Open the Object Spy and observe the children of the WebView element:

 

If the children are displayed as native elements (see below) - then the application was not instrumented.

 Non-instrumented Object Tree in iOS


If the children of the WebView element appear in the Object Tree as DOM objects (see below) - then the application was instrumented.

Instrumented iOS application


The following picture shows an instrumented Object Tree for an Android hybrid application:


An additional indicator in the Object Spy is the option to select the children of the WebView in the Object Spy if the app has been instrumented.