Use MObject when other objects cannot be used. This object is not optimized; it is a raw level object.
MObject does not have a default timeout. It should be specified with the Timeout parameter or with a wait command. When using the Timeout parameter, the object is a synchronization point.
Properties
The built-in MObject properties that can be retrieved from the MObject include:
- text/image
- object_type
- y_alignment_height
- y_alignment
- y
- x_alignment_width
- x_alignment
- x
- width
- height
- whole_word_search
- visual_relation_inline
- visual_relation_direction
- touch_position
- threshold
- target
- search_area
- scroll_and_search
- screen_source
- restrict_dictionary_finding
- report_image_resolution
- position_value
- policy
- operation
- ocr_white_level
- ocr_unsharp_radius
- ocr_unsharp_amount
- ocr_languages
- ocr_generic
- ocr_gamma
- ocr_dpi
- ocr_contrast
- ocr_brightness
- ocr_black_level
- next
- needle_bound
- max_scroll
- match_mode
- match_grade
- inverted_text
- interval
- index
- image_width
- image_top
- image_left
- image_height
- image
- ignore_whitespaces
- ignore_punctuation
- ignore_case
- haystack_width
- haystack_top
- haystack_left
- haystack_height
- haystack_area
- filter_garbage
- exact_phrase
- duration
- backlight
- analysis_retries
- analysis_mode
Functions
Name | Arguments | Description |
---|---|---|
Click | timeout | Select an image/text on the device screen. |
Find | timeout | Find an image/text on the device screen, and return a Boolean value response. |
GetROProperty | Property | Return the current value of the specified identification property from the object in the application. |
Additional UFT functions |
|
|
Example
UFT Mobile Code Syntax | Description |
---|---|
Device("DUT").MObject("text").Find | On the device under test (DUT), finds a text object, the needle, on the device screen, the haystack, and returns a Boolean value response. |
Device("DUT").MObject("image").Click | On the DUT, identifies an image object, the needle, on the device screen, the haystack, and clicks on it. |