Legacy | UFT Function Reference: MEdit

A Mobile Edit. A text object identified on the device screen based on an image or text label. It can be found, retrieved, and set to the specified text.

MEdit sets the text into the text field, abstracting the operation from the user. A label must be defined in order for the object to identify the location of the text field.

MEdit has a default timeout of 20 seconds. This means that there is a built-in synchronization point that is completed before the button actually appears. This is like other UFT objects.

To retrieve a text value from the device screen, use the GetROProperty text property from the MEdit object. This uses the Edit Get (image) and Edit Get (text) function.

Properties

The built-in MEdit properties that can be retrieved from the MButton include:

  • edit_type
  • label
  • y
  • x
  • whole_words_search
  • visual_relation_inline
  • visual_relation_direction
  • threshold
  • text
  • scroll_and_search
  • screen_source
  • scope
  • restrict_dictionary_finding
  • report_image_resolution
  • 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
  • max_scroll
  • match_mode
  • match_grade
  • lines
  • label_width
  • label_top
  • label_position
  • label_offset
  • label_left
  • label_inline
  • label_height
  • inverted_text
  • interval
  • initial_capitalization
  • index
  • ignore_whitespaces
  • ignore_punctuation
  • ignore_case
  • haystack_width
  • haystack_top
  • haystack_left
  • haystack_height
  • filter_garbage
  • exact_phrase
  • backlight
  • analysis_retries
  • analysis_mode

Functions

Name Arguments Description
Find timeout Find a text value on the device screen, and return a Boolean value response.
Set Value
timeout
Set a text value into an input field.
SetSecure Value
timeout
Set a secure text value into an input field.
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").MEdit("image").GetROProperty "image" On the device under test (DUT), retrieves the text property from the MEdit object.
Device("DUT").MEdit("text").Set "text to insert" On the DUT, inserts the specified text into the edit field based on an image label.
Device("DUT").MEdit("image").Set "text to insert" On the DUT, inserts the specified text into the edit field based on an image label.