Last updated: Sep 26, 2017 13:00
By Yaron White
Utilize the smart Perfecto Mobile Button and Edit functions in visual analysis
To achieve a robust script using ScriptOnce™ technology, native objects are preferred. However, in some cases this method is not supported or applicable and visual analysis should be used. When using visual analysis, the Button & Edit functions should always be the preferred option over the Select functions.
Button functions - recommended
The Button functions (text & image) are an improved version of the generic Select functions. They are optimized for buttons on selected platforms, using the Perfecto Mobile patented platform specific knowledge. Per platform, they internally optimize the identification of the object. This means that the identification, OCR parameters, should NOT be modified by the user; this is automatically done by the system per platform. The Button functions have a default Timeout, this means that there is no need to sync before the button actually appears.
Edit functions - recommended
The strength of the Edit functions (text & image) is their ability to abstract the actual text entry from the user on the selected platform (iOS and Android). Compared to other methods, this is a significant advantage, since the user does not need to figure out what to do and how.
- Existing text within the field will be cleared
- The virtual keyboard will be closed
This will work in any of the device orientations and in any language. This is very important feature for a single-device script and much more for multi-device scripts.
The Edit functions have a default timeout, this means that you do not need to sync before the edit box actually appears. By default these functions search for the needle in the current screen. However, if there is a possibility that the selected needle is not in the current screen, enable the Scroll and search parameter.
The Select functions (text & image) are native screen analysis functions that use raw-level analysis, without taking the OS optimized graphical information into consideration – with generic OCR settings. The Select functions do not have a default Timeout; and require setting the Timeout parameter or using the Wait command. When using the Timeout parameter, the object becomes a synchronization point.
Platform Specific Knowledge
The following is a graphical approach of how Perfecto Mobile analyzes the device screen utilizing the patented platform specific knowledge.
- Retrieve the logical instructions from the script
For Example: click on the button with the text label "Cancel"
- Use platform specific information to adjust the device screen image
For Example: a button in an Android device usually has gradient color and is black, grey or yellow
- Perform visual analysis on the device screen with the given information
- Transfer the visual analysis results to the information analysis level for logical matching & filtering, and translate into workable information
For Example: the button coordinate location is 130,120
- Translate the information to a set of logical low-level commands
For Example: touch on coordinate 130,120
- Perform device specific command on the device, translated from the platform specific information